summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-01-15 22:17:56 -0300
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-01-15 22:17:56 -0300
commita742aa5317b9ab023f38310f4aa88129be3004fb (patch)
tree82b8a30d2eff2fe0cce5cfda96d604bc7732313c
parent4f9d8ebbb2ff636829e0a4e6f632e8fd2ce735b5 (diff)
downloadaskbot-a742aa5317b9ab023f38310f4aa88129be3004fb.tar.gz
askbot-a742aa5317b9ab023f38310f4aa88129be3004fb.tar.bz2
askbot-a742aa5317b9ab023f38310f4aa88129be3004fb.zip
added default value requirement for STATICFILES_STORAGE setting
-rw-r--r--askbot/deployment/__init__.py4
-rw-r--r--askbot/setup_templates/settings.py.mustache2
-rw-r--r--askbot/startup_procedures.py6
3 files changed, 9 insertions, 3 deletions
diff --git a/askbot/deployment/__init__.py b/askbot/deployment/__init__.py
index 6aa866cc..8832cd01 100644
--- a/askbot/deployment/__init__.py
+++ b/askbot/deployment/__init__.py
@@ -129,9 +129,9 @@ def deploy_askbot(directory, options):
if django.VERSION[0] == 1 and django.VERSION[1] < 3:
#force people install the django-staticfiles app
- context['staticfiles_app'] = 'staticfiles'
+ context['staticfiles_app'] = ''
else:
- context['staticfiles_app'] = 'django.contrib.staticfiles'
+ context['staticfiles_app'] = "'django.contrib.staticfiles',"
path_utils.deploy_into(
directory,
diff --git a/askbot/setup_templates/settings.py.mustache b/askbot/setup_templates/settings.py.mustache
index 2e82f273..3bca11ba 100644
--- a/askbot/setup_templates/settings.py.mustache
+++ b/askbot/setup_templates/settings.py.mustache
@@ -153,7 +153,7 @@ INSTALLED_APPS = (
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
- '{{ staticfiles_app }}',
+ {{ staticfiles_app }}
#all of these are needed for the askbot
'django.contrib.admin',
diff --git a/askbot/startup_procedures.py b/askbot/startup_procedures.py
index 88b717bc..65877fdf 100644
--- a/askbot/startup_procedures.py
+++ b/askbot/startup_procedures.py
@@ -321,6 +321,12 @@ def test_staticfiles():
'django-staticfiles app, type\n'
'pip install --upgrade django-staticfiles'
)
+ if not hasattr(django_settings, 'STATICFILES_STORAGE'):
+ raise AskbotConfigError(
+ 'Configure STATICFILES_STORAGE setting as desired, '
+ 'a reasonable default is\n'
+ "STATICFILES_STORAGE = 'staticfiles.storage.StaticFilesStorage'"
+ )
else:
staticfiles_app_name = 'django.contrib.staticfiles'