Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#30161 closed Cleanup/optimization (fixed)

View decorators docs should mention how to decorate class based views

Reported by: Jaap Roes Owned by: Alexandru Balan
Component: Documentation Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Currently the docs on "View decorators" don't mention how to apply a decorator to a class based view.

There are instructions on how to do this in the "Decorating class-based views" section of the "Introduction to class-based views" part of the docs.

To me it seems reasonable to link to that section, or even include (part) of it in the "View decorators" part of the docs.

Another minor note, the "Decorating class-based views" section has instructions on how to apply the login_required decorator, but doesn't mention the alternative LoginRequiredMixin which is only mentioned in the "Using the Django authentication system" part of the docs.

Change History (5)

comment:1 by Tim Graham, 6 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Alexandru Balan, 6 years ago

Owner: changed from nobody to Alexandru Balan
Status: newassigned

comment:3 by Tim Graham, 6 years ago

Has patch: set

comment:4 by Tim Graham <timograham@…>, 6 years ago

Resolution: fixed
Status: assignedclosed

In 406de977:

Fixed #30161 -- Added how to decorate class-based views to view decorators docs.

comment:5 by Tim Graham <timograham@…>, 6 years ago

In 14240e4:

[2.2.x] Fixed #30161 -- Added how to decorate class-based views to view decorators docs.

Backport of 406de977ea1a6429535d21240e3ecdac06d4516c from master.

Note: See TracTickets for help on using tickets.
Back to Top