Statistics
| Branch: | Tag: | Revision:

root / snf-astakos-app / astakos / im / settings.py @ 27993be5

History | View | Annotate | Download (1.9 kB)

1
from django.conf import settings
2
from os.path import abspath, dirname, join
3
from urlparse import urlparse
4

    
5
PROJECT_PATH = getattr(settings, 'PROJECT_PATH', dirname(dirname(abspath(__file__))))
6

    
7
# Set the expiration time of newly created auth tokens
8
# to be this many hours after their creation time.
9
AUTH_TOKEN_DURATION = getattr(settings, 'ASTAKOS_AUTH_TOKEN_DURATION', 30 * 24)
10

    
11
# Authenticate via Twitter.
12
TWITTER_KEY = getattr(settings, 'ASTAKOS_TWITTER_KEY', '')
13
TWITTER_SECRET = getattr(settings, 'ASTAKOS_TWITTER_SECRET', '')
14

    
15
DEFAULT_USER_LEVEL = getattr(settings, 'ASTAKOS_DEFAULT_USER_LEVEL', 4)
16

    
17
INVITATIONS_PER_LEVEL = getattr(settings, 'ASTAKOS_INVITATIONS_PER_LEVEL', {
18
    0   :   100,
19
    1   :   2,
20
    2   :   0,
21
    3   :   0,
22
    4   :   0
23
})
24

    
25
# Address to use for outgoing emails
26
DEFAULT_FROM_EMAIL = getattr(settings, 'ASTAKOS_DEFAULT_FROM_EMAIL', 'GRNET Cloud <no-reply@grnet.gr>')
27
DEFAULT_CONTACT_EMAIL = getattr(settings, 'ASTAKOS_DEFAULT_CONTACT_EMAIL', 'support@cloud.grnet.gr')
28

    
29
# Identity Management enabled modules
30
IM_MODULES = getattr(settings, 'ASTAKOS_IM_MODULES', ['local', 'twitter', 'shibboleth'])
31

    
32
# Force user profile verification
33
FORCE_PROFILE_UPDATE = getattr(settings, 'ASTAKOS_FORCE_PROFILE_UPDATE', True)
34

    
35
#Enable invitations
36
INVITATIONS_ENABLED = getattr(settings, 'ASTAKOS_INVITATIONS_ENABLED', True)
37

    
38
COOKIE_NAME = getattr(settings, 'ASTAKOS_COOKIE_NAME', '_pithos2_a')
39
COOKIE_DOMAIN = getattr(settings, 'ASTAKOS_COOKIE_DOMAIN', None)
40

    
41
IM_STATIC_URL = getattr(settings, 'ASTAKOS_IM_STATIC_URL', '/im/static/im/')
42

    
43
# If set to False and invitations not enabled newly created user will be automatically accepted
44
MODERATION_ENABLED = getattr(settings, 'ASTAKOS_MODERATION_ENABLED', True)
45

    
46
# Set baseurl
47
BASEURL = getattr(settings, 'ASTAKOS_BASEURL', 'http://pithos.dev.grnet.gr')
48

    
49
# Set service name
50
SITENAME = getattr(settings, 'ASTAKOS_SITENAME', 'GRNET Cloud')