Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#14758 closed (fixed)

QuerySet method docs headings contain entire method signatures

Reported by: Gabriel Hurley Owned by: Adam Vandenberg
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: no UI/UX: no

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 Adam Vandenberg 14 years ago.
Update queryset headers on page (haven't checked cross-links yet)
fix-queryset-headers-2.diff (14.5 KB ) - added by Adam Vandenberg 14 years ago.
Updated patch.

Download all attachments as: .zip

Change History (7)

comment:1 by Adam Vandenberg, 14 years ago

Owner: changed from nobody to Adam Vandenberg

by Adam Vandenberg, 14 years ago

Attachment: fix-queryset-headers.diff added

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

by Adam Vandenberg, 14 years ago

Attachment: fix-queryset-headers-2.diff added

Updated patch.

comment:2 by Adam Vandenberg, 14 years ago

(Patch is ready for review.)

comment:3 by Tim Graham, 14 years ago

Resolution: fixed
Status: newclosed

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

comment:4 by Tim Graham, 14 years ago

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

Backport of r14737 from trunk.

comment:5 by Jacob, 13 years ago

milestone: 1.3

Milestone 1.3 deleted

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