From f4026f4859fa315ba758b124fc8328bb057f52ab Mon Sep 17 00:00:00 2001 From: Marton Kiss Date: Mon, 11 Jan 2016 16:17:59 +0100 Subject: [PATCH] Pin ask staging branch to 0.7.x and update settings The askbot branches were separated by major versions, in the upstream repository so this patch pins the ask-staging to the 0.7.x. The 0.7.x. branch works with django version 1.5.x. Settings.py now contains the new language configuration options, including the ASKBOT_LANGUAGE_MODE settings and the required captcha module. Change-Id: Icd1052da20396601010315447a385fe7353391cd --- modules/openstack_project/manifests/ask_staging.pp | 1 + .../templates/askbot/settings.py-staging.erb | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/openstack_project/manifests/ask_staging.pp b/modules/openstack_project/manifests/ask_staging.pp index 4d6e7cf87c..aa3dad4aed 100644 --- a/modules/openstack_project/manifests/ask_staging.pp +++ b/modules/openstack_project/manifests/ask_staging.pp @@ -92,6 +92,7 @@ class openstack_project::ask_staging ( # askbot site class { 'askbot': + askbot_branch => '0.7.x', db_provider => 'pgsql', db_name => $db_name, db_user => $db_user, diff --git a/modules/openstack_project/templates/askbot/settings.py-staging.erb b/modules/openstack_project/templates/askbot/settings.py-staging.erb index 7f064e605f..c970986baf 100644 --- a/modules/openstack_project/templates/askbot/settings.py-staging.erb +++ b/modules/openstack_project/templates/askbot/settings.py-staging.erb @@ -97,6 +97,7 @@ SECRET_KEY = '44fb9b7219e3743bffabb6861cbc9a28' # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( 'askbot.skins.loaders.Loader', + 'askbot.skins.loaders.JinjaAppDirectoryLoader', 'django.template.loaders.app_directories.Loader', 'django.template.loaders.filesystem.Loader', #'django.template.loaders.eggs.load_template_source', @@ -198,10 +199,13 @@ INSTALLED_APPS = ( 'followit', 'tinymce', 'group_messaging', + 'captcha', #'avatar',#experimental use git clone git://github.com/ericflo/django-avatar.git$ ) +NOCAPTCHA = True + #setup memcached for production use! #see http://docs.djangoproject.com/en/1.1/topics/cache/ for details CACHE_BACKEND = 'locmem://' @@ -398,7 +402,7 @@ GROUP_MESSAGING = { 'BASE_URL_PARAMS': {'section': 'messages', 'sort': 'inbox'} } -ASKBOT_MULTILINGUAL = True +ASKBOT_LANGUAGE_MODE = 'url-lang' LANGUAGES = ( ('en', 'English'), @@ -418,6 +422,7 @@ if 'ASKBOT_CSS_DEVEL' in locals() and ASKBOT_CSS_DEVEL == True: COMPRESS_JS_FILTERS = [] COMPRESS_PARSER = 'compressor.parser.HtmlParser' JINJA2_EXTENSIONS = ('compressor.contrib.jinja2ext.CompressorExtension',) +JINJA2_TEMPLATES = ('captcha',) # Use syncdb for tests instead of South migrations. Without this, some tests # fail spuriously in MySQL.