#1016 closed enhancement (wontfix)
Ability to specify decorators for generic views
Reported by: | Owned by: | Jacob | |
---|---|---|---|
Component: | Generic views | Version: | |
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
At present time the only way to specify view decorators (e.g., conditional caching) for generic views is to wrap them in custom views. It would be desirable to have a shortcut for that.
Change History (3)
comment:1 by , 19 years ago
comment:3 by , 18 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Closing for the reason pointed out by Hugo in the above comment.
Note:
See TracTickets
for help on using tickets.
you can just do normal assignments (the Python 2.3 syntax for decorators):
So you don't need to do any custom view, you just call the decorator on the generic one. Ok, you have to put that into some module somewhere, but views.py is as good a place for that as any other file ;-)