Author: timo
Date: 2012-02-20 10:57:51 -0800 (Mon, 20 Feb 2012)
New Revision: 17564

Modified:
   django/trunk/docs/topics/auth.txt
   django/trunk/docs/topics/class-based-views.txt
Log:
Fixed #17390 - Added a note to topics/auth.txt regarding how to decorate 
class-based generic views; thanks zsiciarz for the patch.

Modified: django/trunk/docs/topics/auth.txt
===================================================================
--- django/trunk/docs/topics/auth.txt   2012-02-19 16:53:55 UTC (rev 17563)
+++ django/trunk/docs/topics/auth.txt   2012-02-20 18:57:51 UTC (rev 17564)
@@ -1457,10 +1457,17 @@
 Limiting access to generic views
 --------------------------------
 
-To limit access to a :doc:`generic view </ref/generic-views>`, write a thin
-wrapper around the view, and point your URLconf to your wrapper instead of the
-generic view itself. For example::
+Controlling access to a :doc:`class-based generic view 
</ref/class-based-views>`
+is done by decorating the :meth:`View.dispatch 
<django.views.generic.base.View.dispatch>`
+method on the class. See :ref:`decorating-class-based-views` for the details.
 
+Function-based generic views
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+To limit access to a :doc:`function-based generic view </ref/generic-views>`,
+write a thin wrapper around the view, and point your URLconf to your wrapper
+instead of the generic view itself. For example::
+
     from django.views.generic.date_based import object_detail
 
     @login_required

Modified: django/trunk/docs/topics/class-based-views.txt
===================================================================
--- django/trunk/docs/topics/class-based-views.txt      2012-02-19 16:53:55 UTC 
(rev 17563)
+++ django/trunk/docs/topics/class-based-views.txt      2012-02-20 18:57:51 UTC 
(rev 17564)
@@ -584,6 +584,8 @@
 want every instance of a view to be decorated, you need to take a
 different approach.
 
+.. _decorating-class-based-views:
+
 Decorating the class
 --------------------
 

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to