src/cm/cm_settings.py
author gibus
Wed, 11 Sep 2013 23:13:01 +0200
changeset 532 0bad3613f59d
parent 360 bfaab8740995
child 651 9bbc657f6837
permissions -rw-r--r--
Reverse to YUI 3.0.0 since with YUI.3.10.3, comment content including words 'paragraph' or 'section' do not show up on Firefox, this is weird and has to be investigated.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     1
# default cm settings
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     2
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     3
from django.conf import settings
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     4
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     5
def get_setting(setting_name, default=None):
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     6
    return getattr(settings, setting_name, default)
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     7
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     8
VALID_EMAIL_FOR_PUBLISH = get_setting('VALID_EMAIL_FOR_PUBLISH', True)
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     9
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    10
CM_EMAIL_SUBJECT_PREFIX = get_setting('CM_EMAIL_SUBJECT_PREFIX', '[comt] ')
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    11
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    12
SITE_NAME = get_setting('SITE_NAME', 'comt ')
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    13
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    14
DEFAULT_TIME_ZONE = get_setting('DEFAULT_TIME_ZONE','Europe/Paris') 
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    15
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    16
# button for new text version creation checked by default 
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    17
NEW_TEXT_VERSION_ON_EDIT = get_setting('NEW_TEXT_VERSION_ON_EDIT', True)
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    18
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    19
# option to bypass all security checks 
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    20
NO_SECURITY = get_setting('NO_SECURITY', False)
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    21
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    22
# should every contributor be registered to notifications automatically
44
c27132146767 add setting to hide emails in admin page
raph
parents: 0
diff changeset
    23
AUTO_CONTRIB_REGISTER = get_setting('AUTO_CONTRIB_REGISTER', False)
c27132146767 add setting to hide emails in admin page
raph
parents: 0
diff changeset
    24
c27132146767 add setting to hide emails in admin page
raph
parents: 0
diff changeset
    25
# show email in user list
228
3a0f8b54a151 add tracking HTML from configuration
raph
parents: 44
diff changeset
    26
SHOW_EMAILS_IN_ADMIN = get_setting('SHOW_EMAILS_IN_ADMIN', True)
3a0f8b54a151 add tracking HTML from configuration
raph
parents: 44
diff changeset
    27
282
b5deb8e32219 add STORE_ACTIVITY_IP parameter to avoid storing ips for activities.
raph
parents: 228
diff changeset
    28
TRACKING_HTML = get_setting('TRACKING_HTML', '')
b5deb8e32219 add STORE_ACTIVITY_IP parameter to avoid storing ips for activities.
raph
parents: 228
diff changeset
    29
b5deb8e32219 add STORE_ACTIVITY_IP parameter to avoid storing ips for activities.
raph
parents: 228
diff changeset
    30
# Store IP (or not) in activity 
292
3442202aff1a add parameter to display "decorated" creator (used with api calls)
raph
parents: 282
diff changeset
    31
STORE_ACTIVITY_IP = get_setting('STORE_ACTIVITY_IP', True)
3442202aff1a add parameter to display "decorated" creator (used with api calls)
raph
parents: 282
diff changeset
    32
3442202aff1a add parameter to display "decorated" creator (used with api calls)
raph
parents: 282
diff changeset
    33
# Show 'decorated' users in comments (not structural creator id) 
360
bfaab8740995 Add abiword as an alternative to open office for conversions
gibus
parents: 292
diff changeset
    34
DECORATED_CREATORS = get_setting('DECORATED_CREATORS', False)
bfaab8740995 Add abiword as an alternative to open office for conversions
gibus
parents: 292
diff changeset
    35
bfaab8740995 Add abiword as an alternative to open office for conversions
gibus
parents: 292
diff changeset
    36
# Use AbiWord for conversions
bfaab8740995 Add abiword as an alternative to open office for conversions
gibus
parents: 292
diff changeset
    37
USE_ABI = get_setting('USE_ABI', False)