diff options
| author | Gabriel Hurley <gabehr@gmail.com> | 2011-04-20 20:03:42 +0000 |
|---|---|---|
| committer | Gabriel Hurley <gabehr@gmail.com> | 2011-04-20 20:03:42 +0000 |
| commit | 99c179442782ea83c52452296d5769950f23a75a (patch) | |
| tree | efd68ceef3f01e8206f6a53e5d478b47adece8ee /docs | |
| parent | 1b1060c9168227e9ff4b1e9141ba6086134030bd (diff) | |
Fixed #15794 -- Corrected an error in the docs which indicated applying decorators to any of the view-like methods would work when it will only work reliably with dispatch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16056 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/class-based-views.txt | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/docs/topics/class-based-views.txt b/docs/topics/class-based-views.txt index 2612ffedba..01d5f2fa65 100644 --- a/docs/topics/class-based-views.txt +++ b/docs/topics/class-based-views.txt @@ -585,11 +585,8 @@ Decorating the class -------------------- To decorate every instance of a class-based view, you need to decorate -the class definition itself. To do this you apply the decorator to one -of the view-like methods on the class; that is, -:meth:`~django.views.generic.base.View.dispatch`, or one of the HTTP -methods (:meth:`~django.views.generic.base.View.get`, -:meth:`~django.views.generic.base.View.post` etc). +the class definition itself. To do this you apply the decorator to the +:meth:`~django.views.generic.base.View.dispatch` method of the class. A method on a class isn't quite the same as a standalone function, so you can't just apply a function decorator to the method -- you need to |
