From fd2979fa38868aaad5385c4eed30996d12142a5e Mon Sep 17 00:00:00 2001 From: Evgeny Fadeev Date: Sun, 19 May 2013 21:55:40 -0400 Subject: added an optional service url prefix to later support namespaces --- askbot/startup_procedures.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'askbot/startup_procedures.py') 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() -- cgit v1.2.3-1-g7c22