diff options
author | Adolfo Fitoria <adolfo.fitoria@gmail.com> | 2012-10-02 09:58:07 -0600 |
---|---|---|
committer | Adolfo Fitoria <adolfo.fitoria@gmail.com> | 2012-10-02 10:40:25 -0600 |
commit | 2a398269923b779b63ca8432b6d98dc2ae6c6a50 (patch) | |
tree | 3b946679a96442d2b0d3081a40624db124a7c1a9 /askbot/setup_templates | |
parent | f1eda1494b753b052c82811419aff8380520ec85 (diff) | |
parent | 8559f348eab0f59aa32d037a43d4a730112bab3c (diff) | |
download | askbot-2a398269923b779b63ca8432b6d98dc2ae6c6a50.tar.gz askbot-2a398269923b779b63ca8432b6d98dc2ae6c6a50.tar.bz2 askbot-2a398269923b779b63ca8432b6d98dc2ae6c6a50.zip |
Merge branch 'master' into haystack
Conflicts:
askbot/models/__init__.py
askbot/models/question.py
askbot/setup_templates/settings.py
askbot/setup_templates/settings.py.mustache
askbot/tests/__init__.py
askbot/tests/badge_tests.py
askbot/tests/db_api_tests.py
askbot/views/commands.py
askbot/views/readers.py
askbot/views/users.py
askbot/views/writers.py
Diffstat (limited to 'askbot/setup_templates')
-rw-r--r-- | askbot/setup_templates/settings.py | 36 | ||||
-rw-r--r-- | askbot/setup_templates/settings.py.mustache | 39 | ||||
-rw-r--r-- | askbot/setup_templates/tinymce_sample_config.py | 27 |
3 files changed, 99 insertions, 3 deletions
diff --git a/askbot/setup_templates/settings.py b/askbot/setup_templates/settings.py index d0a34d55..94df6f29 100644 --- a/askbot/setup_templates/settings.py +++ b/askbot/setup_templates/settings.py @@ -150,6 +150,7 @@ TEMPLATE_CONTEXT_PROCESSORS = ( INSTALLED_APPS = ( + 'longerusername', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', @@ -182,6 +183,8 @@ INSTALLED_APPS = ( CACHE_BACKEND = 'locmem://' #needed for django-keyedcache CACHE_TIMEOUT = 6000 +#sets a special timeout for livesettings if you want to make them different +LIVESETTINGS_CACHE_TIMEOUT = CACHE_TIMEOUT CACHE_PREFIX = 'askbot' #make this unique CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True #If you use memcache you may want to uncomment the following line to enable memcached based sessions @@ -227,7 +230,9 @@ CSRF_COOKIE_NAME = 'askbot_csrf' #enter domain name here - e.g. example.com #CSRF_COOKIE_DOMAIN = '' -STATICFILES_DIRS = ( os.path.join(ASKBOT_ROOT, 'skins'),) +STATICFILES_DIRS = ( + ('default/media', os.path.join(ASKBOT_ROOT, 'media')), +) RECAPTCHA_USE_SSL = True @@ -237,3 +242,32 @@ HAYSTACK_SITECONF = 'askbot.search.haystack' #more information #http://django-haystack.readthedocs.org/en/v1.2.7/settings.html HAYSTACK_SEARCH_ENGINE = 'simple' + +TINYMCE_COMPRESSOR = True +TINYMCE_SPELLCHECKER = False +TINYMCE_JS_ROOT = os.path.join(STATIC_ROOT, 'common/media/js/tinymce/') +TINYMCE_URL = STATIC_URL + 'common/media/js/tinymce/' +TINYMCE_DEFAULT_CONFIG = { + 'plugins': 'askbot_imageuploader,askbot_attachment', + 'theme': 'advanced', + 'content_css': STATIC_URL + 'default/media/style/tinymce/content.css', + 'force_br_newlines': True, + 'force_p_newlines': False, + 'forced_root_block': '', + 'mode' : 'textareas', + 'oninit': "function(){ tinyMCE.activeEditor.setContent(askbot['data']['editorContent'] || ''); }", + 'plugins': 'askbot_imageuploader,askbot_attachment', + 'theme_advanced_toolbar_location' : 'top', + 'theme_advanced_toolbar_align': 'left', + 'theme_advanced_buttons1': 'bold,italic,underline,|,bullist,numlist,|,undo,redo,|,link,unlink,askbot_imageuploader,askbot_attachment', + 'theme_advanced_buttons2': '', + 'theme_advanced_buttons3' : '', + 'theme_advanced_path': False, + 'theme_advanced_resizing': True, + 'theme_advanced_resize_horizontal': False, + 'theme_advanced_statusbar_location': 'bottom', + 'height': '250' +} + +#delayed notifications, time in seconds, 15 mins by default +NOTIFICATION_DELAY_TIME = 60 * 15 diff --git a/askbot/setup_templates/settings.py.mustache b/askbot/setup_templates/settings.py.mustache index 07e6aef0..74295513 100644 --- a/askbot/setup_templates/settings.py.mustache +++ b/askbot/setup_templates/settings.py.mustache @@ -97,7 +97,7 @@ TEMPLATE_LOADERS = ( MIDDLEWARE_CLASSES = ( #'django.middleware.gzip.GZipMiddleware', - 'askbot.middleware.locale.LocaleMiddleware', + #'askbot.middleware.locale.LocaleMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', #'django.middleware.cache.UpdateCacheMiddleware', 'django.middleware.common.CommonMiddleware', @@ -149,6 +149,7 @@ TEMPLATE_CONTEXT_PROCESSORS = ( INSTALLED_APPS = ( + 'longerusername', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', @@ -182,6 +183,8 @@ INSTALLED_APPS = ( CACHE_BACKEND = 'locmem://' #needed for django-keyedcache CACHE_TIMEOUT = 6000 +#sets a special timeout for livesettings if you want to make them different +LIVESETTINGS_CACHE_TIMEOUT = CACHE_TIMEOUT CACHE_PREFIX = 'askbot' #make this unique CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True #If you use memcache you may want to uncomment the following line to enable memcached based sessions @@ -229,7 +232,9 @@ CSRF_COOKIE_NAME = '{{domain_name}}_csrf' #CSRF_COOKIE_DOMAIN = DOMAIN_NAME STATIC_ROOT = os.path.join(PROJECT_ROOT, "static") -STATICFILES_DIRS = (os.path.join(ASKBOT_ROOT, 'skins'),) +STATICFILES_DIRS = ( + ('default/media', os.path.join(ASKBOT_ROOT, 'media')), +) RECAPTCHA_USE_SSL = True @@ -239,3 +244,33 @@ HAYSTACK_SITECONF = 'askbot.search.haystack' #more information #http://django-haystack.readthedocs.org/en/v1.2.7/settings.html HAYSTACK_SEARCH_ENGINE = 'simple' + +TINYMCE_COMPRESSOR = True +TINYMCE_SPELLCHECKER = False +TINYMCE_JS_ROOT = os.path.join(STATIC_ROOT, 'common/media/js/tinymce/') +TINYMCE_URL = STATIC_URL + 'common/media/js/tinymce/' +TINYMCE_DEFAULT_CONFIG = { + 'plugins': 'askbot_imageuploader,askbot_attachment', + 'theme': 'advanced', + 'content_css': STATIC_URL + 'default/media/style/tinymce/content.css', + 'force_br_newlines': True, + 'force_p_newlines': False, + 'forced_root_block': '', + 'mode' : 'textareas', + 'oninit': "function(){ tinyMCE.activeEditor.setContent(askbot['data']['editorContent'] || ''); }", + 'plugins': 'askbot_imageuploader,askbot_attachment', + 'theme_advanced_toolbar_location' : 'top', + 'theme_advanced_toolbar_align': 'left', + 'theme_advanced_buttons1': 'bold,italic,underline,|,bullist,numlist,|,undo,redo,|,link,unlink,askbot_imageuploader,askbot_attachment', + 'theme_advanced_buttons2': '', + 'theme_advanced_buttons3' : '', + 'theme_advanced_path': False, + 'theme_advanced_resizing': True, + 'theme_advanced_resize_horizontal': False, + 'theme_advanced_statusbar_location': 'bottom', + 'width': '723', + 'height': '250' +} + +#delayed notifications, time in seconds, 15 mins by default +NOTIFICATION_DELAY_TIME = 60 * 15 diff --git a/askbot/setup_templates/tinymce_sample_config.py b/askbot/setup_templates/tinymce_sample_config.py new file mode 100644 index 00000000..11085212 --- /dev/null +++ b/askbot/setup_templates/tinymce_sample_config.py @@ -0,0 +1,27 @@ +TINYMCE_COMPRESSOR = True +TINYMCE_SPELLCHECKER = False +TINYMCE_JS_ROOT = os.path.join(STATIC_ROOT, 'default/media/js/tinymce/') +TINYMCE_URL = STATIC_URL + 'default/media/js/tinymce/' +TINYMCE_DEFAULT_CONFIG = { + 'convert_urls': False, + 'plugins': 'askbot_imageuploader,askbot_attachment', + 'theme': 'advanced', + 'content_css': STATIC_URL + 'default/media/style/tinymce/content.css', + 'force_br_newlines': True, + 'force_p_newlines': False, + 'forced_root_block': '', + 'mode' : 'textareas', + 'oninit': "function(){ tinyMCE.activeEditor.setContent(askbot['data']['editorContent'] || ''); }", + 'plugins': 'askbot_imageuploader,askbot_attachment', + 'theme_advanced_toolbar_location' : 'top', + 'theme_advanced_toolbar_align': 'left', + 'theme_advanced_buttons1': 'bold,italic,underline,|,bullist,numlist,|,undo,redo,|,link,unlink,askbot_imageuploader,askbot_attachment', + 'theme_advanced_buttons2': '', + 'theme_advanced_buttons3' : '', + 'theme_advanced_path': False, + 'theme_advanced_resizing': True, + 'theme_advanced_resize_horizontal': False, + 'theme_advanced_statusbar_location': 'bottom', + 'width': '723', + 'height': '250' +} |