[1.6.x] Fixed #22924 -- Added a note about MEDIA_URL in templates.

Thanks raphael.herouart at gmail.com

Backport of 814bcc3395 from master
This commit is contained in:
Tim Graham 2014-07-03 09:20:03 -04:00
parent 9207442fe2
commit 890a2d632e
1 changed files with 5 additions and 0 deletions

View File

@ -1440,6 +1440,11 @@ 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 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. <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
:setting:`TEMPLATE_CONTEXT_PROCESSORS`. It's there by default, but be sure
to include it if you override that setting and want this behavior.
Example: ``"http://media.example.com/"`` Example: ``"http://media.example.com/"``
.. warning:: .. warning::