diff options
| author | Collin Anderson <cmawebsite@gmail.com> | 2015-01-12 10:48:49 -0500 |
|---|---|---|
| committer | Collin Anderson <cmawebsite@gmail.com> | 2015-01-12 13:17:44 -0500 |
| commit | 26a92619f62aeb6f60e15c62e8322c96744eff26 (patch) | |
| tree | 7f7d5b16dbd247b5e55ab262a36143b9afda3d8c /docs/ref | |
| parent | bbbed99f6260a8b3e65cb990e49721b1ce4a441b (diff) | |
Fixed #24124 -- Changed context_processors in the default settings.py
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/settings.txt | 5 | ||||
| -rw-r--r-- | docs/ref/templates/api.txt | 12 |
2 files changed, 6 insertions, 11 deletions
diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt index 7dcdab9e79..db2850da6d 100644 --- a/docs/ref/settings.txt +++ b/docs/ref/settings.txt @@ -1873,10 +1873,9 @@ for :doc:`managing stored files </topics/files>`. It must end in a slash if set 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 +If you want to use ``{{ MEDIA_URL }}`` in your templates, add ``'django.template.context_processors.media'`` in the ``'context_processors'`` -option of :setting:`TEMPLATES`. It's there by default, but be sure to include -it if you override that setting and want this behavior. +option of :setting:`TEMPLATES`. Example: ``"http://media.example.com/"`` diff --git a/docs/ref/templates/api.txt b/docs/ref/templates/api.txt index 7afbb44179..9faca5b9e1 100644 --- a/docs/ref/templates/api.txt +++ b/docs/ref/templates/api.txt @@ -554,12 +554,9 @@ settings file, the default template engine contains the following context processors:: [ - 'django.contrib.auth.context_processors.auth', '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.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ] @@ -625,7 +622,7 @@ Built-in template context processors Context processors ------------------ -Here's what each of the default processors does: +Here's what each of the built-in processors does: django.contrib.auth.context_processors.auth ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -695,8 +692,7 @@ django.template.context_processors.request ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If this processor is enabled, every ``RequestContext`` will contain a variable -``request``, which is the current :class:`~django.http.HttpRequest`. Note that -this processor is not enabled by default; you'll have to activate it. +``request``, which is the current :class:`~django.http.HttpRequest`. django.contrib.messages.context_processors.messages ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
