#15342 closed (fixed)
Example of decorated class-based generic view is missing *args
Reported by: | Jannis Vajen | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.3-beta |
Severity: | Keywords: | class-based generic views, documentation | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
In http://docs.djangoproject.com/en/dev/topics/class-based-views/#decorating-the-class
@method_decorator(login_required) def dispatch(self, *args, **kwargs): return super(ProtectedView, self).dispatch(**kwargs)
has to be
@method_decorator(login_required) def dispatch(self, *args, **kwargs): return super(ProtectedView, self).dispatch(*args, **kwargs)
Attachments (1)
Note:
See TracTickets
for help on using tickets.
Adds
*args
to decorated dispatch() example