From f99267e5e6779d192959569155846f8b0ca5eb07 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Thu, 3 Jul 2014 09:20:03 -0400 Subject: [PATCH] [1.7.x] Fixed #22924 -- Added a note about MEDIA_URL in templates. Thanks raphael.herouart at gmail.com Backport of 814bcc3395 from master --- docs/ref/settings.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt index 0c6e4fc5af..ade91da821 100644 --- a/docs/ref/settings.txt +++ b/docs/ref/settings.txt @@ -1728,6 +1728,11 @@ for :doc:`managing stored 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 ` 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/"`` .. warning::