diff --git a/docs/topics/auth.txt b/docs/topics/auth.txt index 1cfccfc5e0..3b6ad1b77d 100644 --- a/docs/topics/auth.txt +++ b/docs/topics/auth.txt @@ -1457,9 +1457,16 @@ The permission_required decorator Limiting access to generic views -------------------------------- -To limit access to a :doc:`generic view `, 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 ` +is done by decorating the :meth:`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 `, +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 diff --git a/docs/topics/class-based-views.txt b/docs/topics/class-based-views.txt index d375e8d67b..81c59fed53 100644 --- a/docs/topics/class-based-views.txt +++ b/docs/topics/class-based-views.txt @@ -584,6 +584,8 @@ This approach applies the decorator on a per-instance basis. If you want every instance of a view to be decorated, you need to take a different approach. +.. _decorating-class-based-views: + Decorating the class --------------------