src/cm/cm_settings.py
author Simon Descarpentries <sid@sopinspace.com>
Mon, 21 Oct 2013 16:50:41 +0200
changeset 554 8e116b8ddbc3
parent 360 bfaab8740995
child 651 9bbc657f6837
permissions -rw-r--r--
Merge [text_view_comments] To allow scrolling in Safari mobile, we set the content of text_view_comments frame in a jQuery UI layout. [c_sync.js] So the automated scrolling operations in c_sync.js must be adjustable to the right part to scroll. [c_sync.js] Also, if a comment have to be shown outside of the current viewport, we scroll the correct part to that viewport and then set the comment top Y offset to juste what it needs to avoid the "Add comment" button after scrolling operation. [c_sync.js] If not in Safari mobile, we add an offset here to avoid comment to display under the "Add comment" button.

# default cm settings

from django.conf import settings

def get_setting(setting_name, default=None):
    return getattr(settings, setting_name, default)

VALID_EMAIL_FOR_PUBLISH = get_setting('VALID_EMAIL_FOR_PUBLISH', True)

CM_EMAIL_SUBJECT_PREFIX = get_setting('CM_EMAIL_SUBJECT_PREFIX', '[comt] ')

SITE_NAME = get_setting('SITE_NAME', 'comt ')

DEFAULT_TIME_ZONE = get_setting('DEFAULT_TIME_ZONE','Europe/Paris') 

# button for new text version creation checked by default 
NEW_TEXT_VERSION_ON_EDIT = get_setting('NEW_TEXT_VERSION_ON_EDIT', True)

# option to bypass all security checks 
NO_SECURITY = get_setting('NO_SECURITY', False)

# should every contributor be registered to notifications automatically
AUTO_CONTRIB_REGISTER = get_setting('AUTO_CONTRIB_REGISTER', False)

# show email in user list
SHOW_EMAILS_IN_ADMIN = get_setting('SHOW_EMAILS_IN_ADMIN', True)

TRACKING_HTML = get_setting('TRACKING_HTML', '')

# Store IP (or not) in activity 
STORE_ACTIVITY_IP = get_setting('STORE_ACTIVITY_IP', True)

# Show 'decorated' users in comments (not structural creator id) 
DECORATED_CREATORS = get_setting('DECORATED_CREATORS', False)

# Use AbiWord for conversions
USE_ABI = get_setting('USE_ABI', False)