Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

handle redundant ADMIN_MEDIA_PREFIX removed from Django in 1.4

  • Loading branch information...
commit 740a4186288161a033791cf167707547409a4956 1 parent 3304a4f
@bretth authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 woven/environment.py
View
8 woven/environment.py
@@ -406,8 +406,12 @@ def set_env(settings=None, setup_dir=''):
#be used by woven or fabric
env.MEDIA_ROOT = project_settings.MEDIA_ROOT
env.MEDIA_URL = project_settings.MEDIA_URL
- env.ADMIN_MEDIA_PREFIX = project_settings.ADMIN_MEDIA_PREFIX
- if not env.STATIC_URL: env.STATIC_URL = project_settings.ADMIN_MEDIA_PREFIX
+ try:
+ env.ADMIN_MEDIA_PREFIX = project_settings.ADMIN_MEDIA_PREFIX
+ except AttributeError:
+ env.ADMIN_MEDIA_PREFIX = ''
+ if not env.STATIC_URL:
+ env.STATIC_URL = project_settings.ADMIN_MEDIA_PREFIX
env.TEMPLATE_DIRS = project_settings.TEMPLATE_DIRS
#Set the server /etc/timezone
Please sign in to comment.
Something went wrong with that request. Please try again.