diff options
| author | Luke Plant <L.Plant.98@cantab.net> | 2011-06-08 11:12:01 +0000 |
|---|---|---|
| committer | Luke Plant <L.Plant.98@cantab.net> | 2011-06-08 11:12:01 +0000 |
| commit | bb12a02bd8cd6e33b947b2cfa01292822099bb19 (patch) | |
| tree | 6d572f1af67e0c8e45038d5b45da839bc0d0e16a /docs | |
| parent | b67ff14208049e90310c4c312036116ee620c295 (diff) | |
Deprecated legacy ways of calling cache_page
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16338 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/internals/deprecation.txt | 3 | ||||
| -rw-r--r-- | docs/releases/1.4.txt | 20 | ||||
| -rw-r--r-- | docs/topics/cache.txt | 4 |
3 files changed, 23 insertions, 4 deletions
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt index 4d81cb7ba3..131f813f83 100644 --- a/docs/internals/deprecation.txt +++ b/docs/internals/deprecation.txt @@ -207,6 +207,9 @@ their deprecation, as per the :ref:`Django deprecation policy refactored to use class based views with pluggable backends in 1.4. The previous implementation will be deprecated. + * Legacy ways of calling + :func:`~django.views.decorators.cache.cache_page` will be removed. + * 2.0 * ``django.views.defaults.shortcut()``. This function has been moved to ``django.contrib.contenttypes.views.shortcut()`` as part of the diff --git a/docs/releases/1.4.txt b/docs/releases/1.4.txt index bddb15cd3e..83ebaa738b 100644 --- a/docs/releases/1.4.txt +++ b/docs/releases/1.4.txt @@ -8,10 +8,14 @@ up-to-date information for those who are following trunk. Django 1.4 includes various `new features`_ and some minor `backwards incompatible changes`_. There are also some features that have been dropped, -which are detailed in :doc:`our deprecation plan </internals/deprecation>`. +which are detailed in :doc:`our deprecation plan </internals/deprecation>`, and +we've `begun the deprecation process for some features`_. + + .. _new features: `What's new in Django 1.4`_ .. _backwards incompatible changes: backwards-incompatible-changes-1.4_ +.. _begun the deprecation process for some features: deprecated-features-1.4_ What's new in Django 1.4 ======================== @@ -283,4 +287,16 @@ If you using PUT or DELETE methods in AJAX applications, please see the This was an alias to ``django.template.loader`` since 2005, it has been removed without emitting a warning due to the length of the deprecation. If your code -still referenced this please use ``django.template.loader`` instead.
\ No newline at end of file +still referenced this please use ``django.template.loader`` instead. + +.. _deprecated-features-1.4: + +Features deprecated in 1.4 +========================== + +Old styles of calling ``cache_page`` decorator +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Some legacy ways of calling :func:`~django.views.decorators.cache.cache_page` +have been deprecated, please see the docs for the correct way to use this +decorator. diff --git a/docs/topics/cache.txt b/docs/topics/cache.txt index 0dbe8446b0..839e03d1e3 100644 --- a/docs/topics/cache.txt +++ b/docs/topics/cache.txt @@ -494,7 +494,7 @@ __ `Controlling cache: Using other headers`_ The per-view cache ================== -.. function ``django.views.decorators.cache.cache_page`` +.. function:: django.views.decorators.cache.cache_page A more granular way to use the caching framework is by caching the output of individual views. ``django.views.decorators.cache`` defines a ``cache_page`` @@ -571,7 +571,7 @@ Here's the same thing, with ``my_view`` wrapped in ``cache_page``:: from django.views.decorators.cache import cache_page urlpatterns = ('', - (r'^foo/(\d{1,2})/$', cache_page(my_view, 60 * 15)), + (r'^foo/(\d{1,2})/$', cache_page(60 * 15)(my_view)), ) If you take this approach, don't forget to import ``cache_page`` within your |
