#15715 closed New feature (fixed)
Add a non-trivial decorator example to class-based views docs
Reported by: | Dan McGee | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.3 |
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
To save someone the hassle I just had trying to go beyond the all-too-simple @login_required example. This seemed to work for me at least, so I hope it is correct:
(r'^delete/(?P<pk>\d+)/$', permission_required('main.delete_todolist')(DeleteTodolist.as_view())),
Attached a very simple suggestion for the docs, feel free to redo it if it is not in the style but I tried to look at other relevant examples.
Attachments (1)
Change History (7)
by , 14 years ago
Attachment: | perm-reqd-example.patch added |
---|
comment:1 by , 14 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 14 years ago
Type: | → New feature |
---|
comment:3 by , 14 years ago
Severity: | → Normal |
---|
comment:4 by , 13 years ago
Easy pickings: | unset |
---|---|
Triage Stage: | Accepted → Ready for checkin |
UI/UX: | unset |
That's great, thank you!
Note:
See TracTickets
for help on using tickets.
Possible documentation update