Statistics
| Branch: | Tag: | Revision:

root / snf-astakos-app / astakos / im / settings.py @ 1ae97c83

History | View | Annotate | Download (2.2 kB)

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

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

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

    
13
DEFAULT_USER_LEVEL = getattr(settings, 'ASTAKOS_DEFAULT_USER_LEVEL', 4)
14

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

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

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

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

    
33
#Enable invitations
34
INVITATIONS_ENABLED = getattr(settings, 'ASTAKOS_INVITATIONS_ENABLED', True)
35

    
36
COOKIE_NAME = getattr(settings, 'ASTAKOS_COOKIE_NAME', '_pithos2_a')
37
COOKIE_DOMAIN = getattr(settings, 'ASTAKOS_COOKIE_DOMAIN', None)
38
COOKIE_SECURE = getattr(settings, 'ASTAKOS_COOKIE_SECURE', True)
39

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

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

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

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

    
51
# Set cloud services appear in the horizontal bar
52
CLOUD_SERVICES = getattr(settings, 'ASTAKOS_CLOUD_SERVICES', (
53
        { 'url':'/', 'name':'grnet cloud', 'id':'cloud', 'icon':'home-icon.png' },
54
        { 'url':'/okeanos.html', 'name':'~okeanos', 'id':'okeanos' },
55
        { 'url':'/ui/', 'name':'pithos+', 'id':'pithos' }))