Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#14758 closed (fixed)

QuerySet method docs headings contain entire method signatures

Reported by: gabrielhurley Owned by: adamv
Component: Documentation Version: 1.2
Severity: Keywords: easy-pickings
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Take a look at this URL (the URL itself, not the page):

http://docs.djangoproject.com/en/dev/ref/models/querysets/#extra-select-none-where-none-params-none-tables-none-order-by-none-select-params-none

Basically, the headings for the QuerySet methods (and consequently the hash for the anchors in the URLs) contain the entire method signature. This is completely non-functional (as opposed to the :method: declarations directly beneath the headings), it adds unnecessary detail to the page's TOC, and it makes the URLs for those anchors unbearably long/cluttered.

As such, the headings for those methods should all be reduced to simply the name of the method, leaving the method signature defined below.

It looks like the duplication stems from the headings having been written first, and left in place as-is after the method directives were added.

The only downside to fixing this is that any existing external links directly to one of these anchors would now go to top of the page rather than directly to the section within the page.

Attachments (2)

fix-queryset-headers.diff (12.2 KB) - added by adamv 4 years ago.
Update queryset headers on page (haven't checked cross-links yet)
fix-queryset-headers-2.diff (14.5 KB) - added by adamv 4 years ago.
Updated patch.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 4 years ago by adamv

  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to adamv
  • Patch needs improvement unset

Changed 4 years ago by adamv

Update queryset headers on page (haven't checked cross-links yet)

Changed 4 years ago by adamv

Updated patch.

comment:2 Changed 4 years ago by adamv

(Patch is ready for review.)

comment:3 Changed 4 years ago by timo

  • Resolution set to fixed
  • Status changed from new to closed

(In [14737]) Fixed #14758 - Remove entire method signatures from QuerySet headings - thanks adamv for the patch.

comment:4 Changed 4 years ago by timo

(In [14738]) Fixed #14758 - Remove entire method signatures from QuerySet headings - thanks adamv for the patch.

Backport of r14737 from trunk.

comment:5 Changed 4 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top