Code

Opened 3 years ago

Closed 3 years ago

#16725 closed Cleanup/optimization (worksforme)

Error in example code from per-view cache docs

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

Description

https://docs.djangoproject.com/en/dev/topics/cache/#specifying-per-view-cache-in-the-urlconf

The second URL pattern is wrong.

(r'^foo/(\d{1,2})/$', cache_page(60 * 15)(my_view)),

Attachments (1)

16725.diff (447 bytes) - added by BernhardEssl 3 years ago.

Download all attachments as: .zip

Change History (2)

Changed 3 years ago by BernhardEssl

comment:1 Changed 3 years ago by julien

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to worksforme
  • Status changed from new to closed

The doc looks good to me as-is (see: source:django/trunk/django/views/decorators/cache.py?rev=16338#L25 and source:django/trunk/tests/regressiontests/decorators/tests.py?rev=16338#L122).

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.