summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/internals/deprecation.txt2
-rw-r--r--docs/ref/contrib/staticfiles.txt2
-rw-r--r--docs/ref/csrf.txt6
-rw-r--r--docs/ref/settings.txt12
-rw-r--r--docs/ref/templates/api.txt38
-rw-r--r--docs/releases/1.8.txt6
-rw-r--r--docs/topics/i18n/timezones.txt2
-rw-r--r--docs/topics/i18n/translation.txt4
8 files changed, 40 insertions, 32 deletions
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt
index 216aab9574..f703b958a0 100644
--- a/docs/internals/deprecation.txt
+++ b/docs/internals/deprecation.txt
@@ -44,6 +44,8 @@ details on these changes.
:class:`~django.core.management.BaseCommand` instead, which takes no arguments
by default.
+* ``django.core.context_processors`` module will be removed.
+
* ``django.db.models.sql.aggregates`` module will be removed.
* ``django.contrib.gis.db.models.sql.aggregates`` module will be removed.
diff --git a/docs/ref/contrib/staticfiles.txt b/docs/ref/contrib/staticfiles.txt
index cddcd966e6..57f35877d7 100644
--- a/docs/ref/contrib/staticfiles.txt
+++ b/docs/ref/contrib/staticfiles.txt
@@ -381,7 +381,7 @@ There are a few other helpers outside of the
:mod:`staticfiles <django.contrib.staticfiles>` app to work with static
files:
-- The :func:`django.core.context_processors.static` context processor
+- The :func:`django.template.context_processors.static` context processor
which adds :setting:`STATIC_URL` to every template context rendered
with :class:`~django.template.RequestContext` contexts.
diff --git a/docs/ref/csrf.txt b/docs/ref/csrf.txt
index 70d2019f65..21e7599a1e 100644
--- a/docs/ref/csrf.txt
+++ b/docs/ref/csrf.txt
@@ -46,11 +46,11 @@ To take advantage of CSRF protection in your views, follow these steps:
that would cause the CSRF token to be leaked, leading to a vulnerability.
3. In the corresponding view functions, ensure that the
- ``'django.core.context_processors.csrf'`` context processor is
+ ``'django.template.context_processors.csrf'`` context processor is
being used. Usually, this can be done in one of two ways:
1. Use RequestContext, which always uses
- ``'django.core.context_processors.csrf'`` (no matter what your
+ ``'django.template.context_processors.csrf'`` (no matter what your
TEMPLATE_CONTEXT_PROCESSORS setting). If you are using
generic views or contrib apps, you are covered already, since these
apps use RequestContext throughout.
@@ -58,8 +58,8 @@ To take advantage of CSRF protection in your views, follow these steps:
2. Manually import and use the processor to generate the CSRF token and
add it to the template context. e.g.::
- from django.core.context_processors import csrf
from django.shortcuts import render_to_response
+ from django.template.context_processors import csrf
def my_view(request):
c = {}
diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt
index 7152b5eed9..11db92fe05 100644
--- a/docs/ref/settings.txt
+++ b/docs/ref/settings.txt
@@ -1863,7 +1863,7 @@ to a non-empty value. You will need to :ref:`configure these files to be served
<serving-uploaded-files-in-development>` in both development and production.
In order to use ``{{ MEDIA_URL }}`` in your templates, you must have
-``'django.core.context_processors.media'`` in your
+``'django.template.context_processors.media'`` in your
:setting:`TEMPLATE_CONTEXT_PROCESSORS`. It's there by default, but be sure
to include it if you override that setting and want this behavior.
@@ -2382,11 +2382,11 @@ TEMPLATE_CONTEXT_PROCESSORS
Default::
("django.contrib.auth.context_processors.auth",
- "django.core.context_processors.debug",
- "django.core.context_processors.i18n",
- "django.core.context_processors.media",
- "django.core.context_processors.static",
- "django.core.context_processors.tz",
+ "django.template.context_processors.debug",
+ "django.template.context_processors.i18n",
+ "django.template.context_processors.media",
+ "django.template.context_processors.static",
+ "django.template.context_processors.tz",
"django.contrib.messages.context_processors.messages")
A tuple of callables that are used to populate the context in ``RequestContext``.
diff --git a/docs/ref/templates/api.txt b/docs/ref/templates/api.txt
index f184544838..ce28fbff74 100644
--- a/docs/ref/templates/api.txt
+++ b/docs/ref/templates/api.txt
@@ -457,15 +457,15 @@ and return a dictionary of items to be merged into the context. By default,
:setting:`TEMPLATE_CONTEXT_PROCESSORS` is set to::
("django.contrib.auth.context_processors.auth",
- "django.core.context_processors.debug",
- "django.core.context_processors.i18n",
- "django.core.context_processors.media",
- "django.core.context_processors.static",
- "django.core.context_processors.tz",
+ "django.template.context_processors.debug",
+ "django.template.context_processors.i18n",
+ "django.template.context_processors.media",
+ "django.template.context_processors.static",
+ "django.template.context_processors.tz",
"django.contrib.messages.context_processors.messages")
In addition to these, ``RequestContext`` always uses
-``django.core.context_processors.csrf``. This is a security
+``django.template.context_processors.csrf``. This is a security
related context processor required by the admin and other contrib apps, and,
in case of accidental misconfiguration, it is deliberately hardcoded in and
cannot be turned off by the :setting:`TEMPLATE_CONTEXT_PROCESSORS` setting.
@@ -526,10 +526,10 @@ If :setting:`TEMPLATE_CONTEXT_PROCESSORS` contains this processor, every
``django.contrib.auth.context_processors.PermWrapper``, representing the
permissions that the currently logged-in user has.
-.. currentmodule:: django.core.context_processors
+.. currentmodule:: django.template.context_processors
-django.core.context_processors.debug
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+django.template.context_processors.debug
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If :setting:`TEMPLATE_CONTEXT_PROCESSORS` contains this processor, every
``RequestContext`` will contain these two variables -- but only if your
@@ -543,8 +543,8 @@ If :setting:`TEMPLATE_CONTEXT_PROCESSORS` contains this processor, every
and how long it took. The list is in order by query and lazily generated
on access.
-django.core.context_processors.i18n
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+django.template.context_processors.i18n
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If :setting:`TEMPLATE_CONTEXT_PROCESSORS` contains this processor, every
``RequestContext`` will contain these two variables:
@@ -555,15 +555,15 @@ If :setting:`TEMPLATE_CONTEXT_PROCESSORS` contains this processor, every
See :doc:`/topics/i18n/index` for more.
-django.core.context_processors.media
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+django.template.context_processors.media
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If :setting:`TEMPLATE_CONTEXT_PROCESSORS` contains this processor, every
``RequestContext`` will contain a variable ``MEDIA_URL``, providing the
value of the :setting:`MEDIA_URL` setting.
-django.core.context_processors.static
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+django.template.context_processors.static
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. function:: static
@@ -571,15 +571,15 @@ If :setting:`TEMPLATE_CONTEXT_PROCESSORS` contains this processor, every
``RequestContext`` will contain a variable ``STATIC_URL``, providing the
value of the :setting:`STATIC_URL` setting.
-django.core.context_processors.csrf
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+django.template.context_processors.csrf
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This processor adds a token that is needed by the :ttag:`csrf_token` template
tag for protection against :doc:`Cross Site Request Forgeries
</ref/csrf>`.
-django.core.context_processors.request
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+django.template.context_processors.request
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If :setting:`TEMPLATE_CONTEXT_PROCESSORS` contains this processor, every
``RequestContext`` will contain a variable ``request``, which is the current
diff --git a/docs/releases/1.8.txt b/docs/releases/1.8.txt
index 54ff4c605e..3e6a95006e 100644
--- a/docs/releases/1.8.txt
+++ b/docs/releases/1.8.txt
@@ -1014,6 +1014,12 @@ Related to the previous item, referencing views as strings in the ``url()``
function is deprecated. Pass the callable view as described in the previous
section instead.
+``django.core.context_processors``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Built-in template context processors have been moved to
+``django.template.context_processors``.
+
``django.test.SimpleTestCase.urls``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/docs/topics/i18n/timezones.txt b/docs/topics/i18n/timezones.txt
index 348ac64978..0360b4789b 100644
--- a/docs/topics/i18n/timezones.txt
+++ b/docs/topics/i18n/timezones.txt
@@ -311,7 +311,7 @@ time zone is unset, the default time zone applies.
get_current_timezone
~~~~~~~~~~~~~~~~~~~~
-When the ``django.core.context_processors.tz`` context processor is
+When the ``django.template.context_processors.tz`` context processor is
enabled -- by default, it is -- each :class:`~django.template.RequestContext`
contains a ``TIME_ZONE`` variable that provides the name of the current time
zone.
diff --git a/docs/topics/i18n/translation.txt b/docs/topics/i18n/translation.txt
index 5a61162809..5ec8f13625 100644
--- a/docs/topics/i18n/translation.txt
+++ b/docs/topics/i18n/translation.txt
@@ -28,7 +28,7 @@ bit of i18n-related overhead in certain places of the framework. If you don't
use internationalization, you should take the two seconds to set
:setting:`USE_I18N = False <USE_I18N>` in your settings file. Then Django will
make some optimizations so as not to load the internationalization machinery.
-You'll probably also want to remove ``'django.core.context_processors.i18n'``
+You'll probably also want to remove ``'django.template.context_processors.i18n'``
from your :setting:`TEMPLATE_CONTEXT_PROCESSORS` setting.
.. note::
@@ -1509,7 +1509,7 @@ back to the previous page.
Make sure that the following item is in your
:setting:`TEMPLATE_CONTEXT_PROCESSORS` list in your settings file::
- 'django.core.context_processors.i18n'
+ 'django.template.context_processors.i18n'
Activate this view by adding the following line to your URLconf::