Opened 9 years ago

Closed 8 years ago

#6832 closed (invalid)

Add description and usage note about decorators in URLconf to the url dispatcher docs

Reported by: Ramiro Morales Owned by: nobody
Component: Documentation Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

At least one of the three persons reporting in #5920 used the cache_page decorator in the URLconf but passed the view parameter as a string and not as a callable object itself.
The patch a) copies the usage case description from the 0.96 release notes to the main documentation and b) adds a note about that specific gotcha.

Attachments (1)

decor_view_parm_in_urlconf.diff (1.1 KB) - added by Ramiro Morales 9 years ago.

Download all attachments as: .zip

Change History (3)

Changed 9 years ago by Ramiro Morales

comment:1 Changed 8 years ago by Jeff Anderson

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

comment:2 Changed 8 years ago by James Bennett

Resolution: invalid
Status: newclosed

I'm not sure we really should document this; the fact that decorators require a callable as an argument is pretty basic Python, and it's not really Django's job to serve as a Python tutorial.

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