Code

Opened 6 years ago

Closed 6 years ago

#6832 closed (invalid)

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

Reported by: ramiro 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 6 years ago.

Download all attachments as: .zip

Change History (3)

Changed 6 years ago by ramiro

comment:1 Changed 6 years ago by programmerq

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 6 years ago by ubernostrum

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

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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.