From e6aab74ee21e8cd5bff2dd840fb356cdbb7fb9fb Mon Sep 17 00:00:00 2001 From: Griatch Date: Thu, 29 Mar 2012 01:15:01 +0200 Subject: [PATCH] Fixing new STATIC_URL setting to work and be backwards compatible with Django versions before 1.4. --- src/settings_default.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/settings_default.py b/src/settings_default.py index 5bd770fa61..ad44133bcb 100644 --- a/src/settings_default.py +++ b/src/settings_default.py @@ -382,9 +382,10 @@ LOGOUT_URL = '/accounts/login' # Example: "http://media.lawrence.com" MEDIA_URL = '/media/' # URL prefix for admin media -- CSS, JavaScript and images. Make sure -# to use a trailing slash. This should match the position defined -# by ADMIN_MEDIA_ROOT. -STATIC_URL = '/media/admin/' +# to use a trailing slash. Django1.4+ will look for admin files under +# STATIC_URL/admin. +STATIC_URL = '/media/' +ADMIN_MEDIA_PREFIX = STATIC_URL + "admin/" # needed for backwards compatibility django < 1.4 # The name of the currently selected web template. This corresponds to the # directory names shown in the webtemplates directory. ACTIVE_TEMPLATE = 'prosimii'