Opened 8 months ago

Closed 6 months ago

#35401 closed Cleanup/optimization (fixed)

Document the `conditional_page` decorator

Reported by: Keryn Knight Owned by: Lufafa Joshua
Component: Documentation Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The GZip Middleware documentation makes mention of the gzip_page decorator, but the Conditional GET middleware doesn't mention there's an equivalent conditional_page decorator, likely ecause there's no mention of that in the HTTP decorators or in the Conditional View Processing topics.

As far as I can tell, the named decorator has been around since 0.9x and it's probably just accidentally not described anywhere, when everything else in that module is.

See also: #6181 and this blog post describing the intent, from James Bennett back in 2007 (yay for cool URIs which haven't suffered link rot!)

Change History (8)

comment:1 by Sarah Boyce, 8 months ago

Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization

Good find, thank you!
It might also make sense for the ​CsrfViewMiddleware to similarly mention csrf_protect.

comment:2 by Lufafa Joshua, 8 months ago

Owner: changed from nobody to Lufafa Joshua
Status: newassigned

comment:3 by Lufafa Joshua, 7 months ago

Has patch: set

comment:4 by Sarah Boyce, 7 months ago

Patch needs improvement: set

comment:5 by Lufafa Joshua, 7 months ago

Patch needs improvement: unset

comment:6 by Sarah Boyce, 6 months ago

Triage Stage: AcceptedReady for checkin

comment:7 by Sarah Boyce <42296566+sarahboyce@…>, 6 months ago

In 708b01c7:

Refs #35401 -- Linked the CsrfViewMiddleware docs to the csrf_protect() decorator.

comment:8 by Sarah Boyce <42296566+sarahboyce@…>, 6 months ago

Resolution: fixed
Status: assignedclosed

In e2428292:

Fixed #35401 -- Documented the conditional_page() decorator.

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