[Django] #30161: View decorators docs should mention how to decorate class based views

7 views
Skip to first unread message

Django

unread,
Feb 7, 2019, 3:31:59 AM2/7/19
to django-...@googlegroups.com
#30161: View decorators docs should mention how to decorate class based views
------------------------------------------------+------------------------
Reporter: Jaap Roes | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
Currently the docs on
"[https://docs.djangoproject.com/en/2.1/topics/http/decorators/ 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
"[https://docs.djangoproject.com/en/2.1/topics/class-based-views/intro
/#decorating-class-based-views 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 "[https://docs.djangoproject.com/en/2.1/topics/auth/default/#the-
loginrequired-mixin Using the Django authentication system]" part of the
docs.

--
Ticket URL: <https://code.djangoproject.com/ticket/30161>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Feb 7, 2019, 5:57:13 PM2/7/19
to django-...@googlegroups.com
#30161: View decorators docs should mention how to decorate class based views
--------------------------------------+------------------------------------

Reporter: Jaap Roes | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/30161#comment:1>

Django

unread,
Mar 9, 2019, 5:23:21 AM3/9/19
to django-...@googlegroups.com
#30161: View decorators docs should mention how to decorate class based views
-------------------------------------+-------------------------------------
Reporter: Jaap Roes | Owner: Alexandru
Type: | Balan
Cleanup/optimization | Status: assigned
Component: Documentation | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Alexandru Balan):

* owner: nobody => Alexandru Balan
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/30161#comment:2>

Django

unread,
Mar 12, 2019, 10:44:51 AM3/12/19
to django-...@googlegroups.com
#30161: View decorators docs should mention how to decorate class based views
-------------------------------------+-------------------------------------
Reporter: Jaap Roes | Owner: Alexandru
Type: | Balan
Cleanup/optimization | Status: assigned
Component: Documentation | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/11075 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/30161#comment:3>

Django

unread,
Mar 12, 2019, 11:26:52 AM3/12/19
to django-...@googlegroups.com
#30161: View decorators docs should mention how to decorate class based views
-------------------------------------+-------------------------------------
Reporter: Jaap Roes | Owner: Alexandru
Type: | Balan
Cleanup/optimization | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"406de977ea1a6429535d21240e3ecdac06d4516c" 406de977]:
{{{
#!CommitTicketReference repository=""
revision="406de977ea1a6429535d21240e3ecdac06d4516c"
Fixed #30161 -- Added how to decorate class-based views to view decorators
docs.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/30161#comment:4>

Django

unread,
Mar 12, 2019, 1:34:35 PM3/12/19
to django-...@googlegroups.com
#30161: View decorators docs should mention how to decorate class based views
-------------------------------------+-------------------------------------
Reporter: Jaap Roes | Owner: Alexandru
Type: | Balan
Cleanup/optimization | Status: closed
Component: Documentation | Version: master

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"14240e491e8e10f9627787d0ba9e76ac0bdf7371" 14240e4]:
{{{
#!CommitTicketReference repository=""
revision="14240e491e8e10f9627787d0ba9e76ac0bdf7371"
[2.2.x] Fixed #30161 -- Added how to decorate class-based views to view
decorators docs.

Backport of 406de977ea1a6429535d21240e3ecdac06d4516c from master.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/30161#comment:5>

Reply all
Reply to author
Forward
0 new messages