diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2013-05-19 21:55:40 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2013-05-19 21:55:40 -0400 |
commit | fd2979fa38868aaad5385c4eed30996d12142a5e (patch) | |
tree | 2ab7679e50f9d3f7504f6b9b957737123623afc7 /askbot/startup_procedures.py | |
parent | bd44f687041b19a2c88b21ce265f4939fc1de930 (diff) | |
download | askbot-fd2979fa38868aaad5385c4eed30996d12142a5e.tar.gz askbot-fd2979fa38868aaad5385c4eed30996d12142a5e.tar.bz2 askbot-fd2979fa38868aaad5385c4eed30996d12142a5e.zip |
added an optional service url prefix to later support namespaces
Diffstat (limited to 'askbot/startup_procedures.py')
-rw-r--r-- | askbot/startup_procedures.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/askbot/startup_procedures.py b/askbot/startup_procedures.py index 621c9e8b..b7ad47bf 100644 --- a/askbot/startup_procedures.py +++ b/askbot/startup_procedures.py @@ -896,6 +896,14 @@ def test_messages_framework(): errors = ('Add to the INSTALLED_APPS section of your settings.py:\n "django.contrib.messages"', ) print_errors(errors) +def test_service_url_prefix(): + errors = list() + prefix = getattr(django_settings, 'ASKBOT_SERVICE_URL_PREFIX', '') + message = 'Service url prefix must have > 1 letters and must end with /' + if prefix: + if len(prefix) == 1 or (not prefix.endswith('/')): + print_errors((message,)) + def run_startup_tests(): """function that runs all startup tests, mainly checking settings config so far @@ -922,6 +930,7 @@ def run_startup_tests(): test_multilingual() #test_csrf_cookie_domain() test_secret_key() + test_service_url_prefix() test_staticfiles() test_template_loader() test_template_context_processors() |