diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2013-01-06 01:53:47 -0300 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2013-01-06 01:53:47 -0300 |
commit | 616585cec22c9f9d457dc92bb7fe2c04b63dde65 (patch) | |
tree | 0607884c0da32e7ceb51d446bb6e0934110ede02 | |
parent | 966720dcfefa3f8daced7ae9fef7ef5df00af0af (diff) | |
download | askbot-616585cec22c9f9d457dc92bb7fe2c04b63dde65.tar.gz askbot-616585cec22c9f9d457dc92bb7fe2c04b63dde65.tar.bz2 askbot-616585cec22c9f9d457dc92bb7fe2c04b63dde65.zip |
added tests for multilingual site to the startup procedures
-rw-r--r-- | askbot/startup_procedures.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/askbot/startup_procedures.py b/askbot/startup_procedures.py index 6817d842..76afcb91 100644 --- a/askbot/startup_procedures.py +++ b/askbot/startup_procedures.py @@ -807,6 +807,23 @@ def test_secret_key(): print_errors([ 'Please change your SECRET_KEY setting, the current is not secure' ]) + + +def test_multilingual(): + is_multilang = getattr(django_settings, 'ASKBOT_MULTILINGUAL', False) + django_version = django.VERSION + if django_version[0] == 1 and django_version[1] < 4: + print_errors([ + 'ASKBOT_MULTILINGUAL=True works only with django >= 1.4' + ]) + + trans_url = getattr(django_settings, 'ASKBOT_TRANSLATE_URL', False) + if is_multilang and trans_url: + print_errors([ + 'Please set ASKBOT_TRANSLATE_URL to False, the "True" option ' + 'is currently not supported due to a bug in django' + ]) + @@ -831,6 +848,7 @@ def run_startup_tests(): test_longerusername() test_avatar() test_group_messaging() + test_multilingual() test_haystack() test_cache_backend() test_secret_key() |