summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-01-15 23:01:01 -0300
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-01-15 23:01:01 -0300
commit7b301e703d9e9f5d46056a055c5d31f47b7af7d6 (patch)
treefdea80b8010ff591c18602b5922f07d4340a91f0
parent0b8884e65260d638e7ba71ee46cd97f67dec46bf (diff)
downloadaskbot-7b301e703d9e9f5d46056a055c5d31f47b7af7d6.tar.gz
askbot-7b301e703d9e9f5d46056a055c5d31f47b7af7d6.tar.bz2
askbot-7b301e703d9e9f5d46056a055c5d31f47b7af7d6.zip
added test on wrong staticfiles app used
-rw-r--r--askbot/startup_procedures.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/askbot/startup_procedures.py b/askbot/startup_procedures.py
index 8f51a9ad..f4452e29 100644
--- a/askbot/startup_procedures.py
+++ b/askbot/startup_procedures.py
@@ -314,6 +314,7 @@ def test_staticfiles():
django_version = django.VERSION
if django_version[0] == 1 and django_version[1] < 3:
staticfiles_app_name = 'staticfiles'
+ wrong_staticfiles_app_name = 'django.contrib.staticfiles'
try_import('staticfiles', 'django-staticfiles')
import staticfiles
if staticfiles.__version__[0] != 1:
@@ -330,12 +331,18 @@ def test_staticfiles():
)
else:
staticfiles_app_name = 'django.contrib.staticfiles'
+ wrong_staticfiles_app_name = 'staticfiles'
if staticfiles_app_name not in django_settings.INSTALLED_APPS:
errors.append(
'Add to the INSTALLED_APPS section of your settings.py:\n'
" '%s'," % staticfiles_app_name
)
+ if wrong_staticfiles_app_name in django_settings.INSTALLED_APPS:
+ errors.append(
+ 'Remove from the INSTALLED_APPS section of your settings.py:\n'
+ " '%s'," % wrong_staticfiles_app_name
+ )
static_url = django_settings.STATIC_URL
if static_url is None or str(static_url).strip() == '':
errors.append(