diff options
author | David Ormsbee <dormsbee@mitx.mit.edu> | 2012-02-15 17:22:23 -0500 |
---|---|---|
committer | David Ormsbee <dormsbee@mitx.mit.edu> | 2012-02-15 17:22:23 -0500 |
commit | c053f460611c977bebfcbc472a6a5d7e6e3a75b9 (patch) | |
tree | 6fcd3143ac6da23b5a4a3b4c5dccf1bd94f90f79 /askbot/startup_procedures.py | |
parent | 6ab8f84c6801a055620ae0ba44bacf4e9aa643ed (diff) | |
download | askbot-c053f460611c977bebfcbc472a6a5d7e6e3a75b9.tar.gz askbot-c053f460611c977bebfcbc472a6a5d7e6e3a75b9.tar.bz2 askbot-c053f460611c977bebfcbc472a6a5d7e6e3a75b9.zip |
Adjust startup check to handle tuples in STATICFILES_DIRS.
Diffstat (limited to 'askbot/startup_procedures.py')
-rw-r--r-- | askbot/startup_procedures.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/askbot/startup_procedures.py b/askbot/startup_procedures.py index 4c76be2c..0ce5b3a1 100644 --- a/askbot/startup_procedures.py +++ b/askbot/startup_procedures.py @@ -356,7 +356,11 @@ def test_staticfiles(): askbot_root = os.path.dirname(askbot.__file__) skin_dir = os.path.abspath(os.path.join(askbot_root, 'skins')) - if skin_dir not in map(os.path.abspath, django_settings.STATICFILES_DIRS): + + # django_settings.STATICFILES_DIRS can have strings or tuples + staticfiles_dirs = [d[1] if isinstance(d, tuple) else d + for d in django_settings.STATICFILES_DIRS] + if skin_dir not in map(os.path.abspath, staticfiles_dirs): errors.append( 'Add to STATICFILES_DIRS list of your settings.py file:\n' " '%s'," % skin_dir @@ -368,7 +372,7 @@ def test_staticfiles(): 'Directory specified with settning ASKBOT_EXTRA_SKINS_DIR ' 'must exist and contain your custom skins for askbot.' ) - if extra_skins_dir not in django_settings.STATICFILES_DIRS: + if extra_skins_dir not in staticfiles_dirs: errors.append( 'Add ASKBOT_EXTRA_SKINS_DIR to STATICFILES_DIRS entry in ' 'your settings.py file.\n' |