#25472: docs for
--------------------------------------+--------------------
     Reporter:  guettli               |      Owner:  nobody
         Type:  Cleanup/optimization  |     Status:  new
    Component:  Documentation         |    Version:  1.8
     Severity:  Normal                |   Keywords:
 Triage Stage:  Unreviewed            |  Has patch:  0
Easy pickings:  0                     |      UI/UX:  0
--------------------------------------+--------------------
 The docs of login_required() should show the usage in class-based-views.

 This pattern seems common:

 ```
 urlpatterns = [
     url(r'^about/',
 login_required(TemplateView.as_view(template_name="secret.html"))),
 ```
 from: https://docs.djangoproject.com/en/1.8/topics/class-based-views/intro
 /#decorating-in-urlconf

 Please update the docs:
 
https://docs.djangoproject.com/en/1.8/topics/auth/default/#django.contrib.auth.decorators.login_required

 Since class-based views are the default today, I think it would be
 appropriate to list the class-based-view way first, and then list the
 decorating of view-methods.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.bda64a3206532801592603b3489425fa%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to