Statistics
| Branch: | Tag: | Revision:

root / snf-astakos-app / astakos / im / settings.py @ e2447828

History | View | Annotate | Download (3.9 kB)

1
from django.conf import settings
2

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

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

    
11
DEFAULT_USER_LEVEL = getattr(settings, 'ASTAKOS_DEFAULT_USER_LEVEL', 4)
12

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

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

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

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

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

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

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

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

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

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

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

    
56
# Set recaptcha keys
57
RECAPTCHA_PUBLIC_KEY = getattr(settings, 'ASTAKOS_RECAPTCHA_PUBLIC_KEY', '')
58
RECAPTCHA_PRIVATE_KEY = getattr(settings, 'ASTAKOS_RECAPTCHA_PRIVATE_KEY', '')
59
RECAPTCHA_OPTIONS = getattr(settings, 'ASTAKOS_RECAPTCHA_OPTIONS', {'theme': 'white'})
60
RECAPTCHA_USE_SSL = getattr(settings, 'ASTAKOS_RECAPTCHA_USE_SSL', True)
61
RECAPTCHA_ENABLED = getattr(settings, 'ASTAKOS_RECAPTCHA_ENABLED', True)
62

    
63
# set AstakosUser fields to propagate in the billing system
64
BILLING_FIELDS = getattr(settings, 'ASTAKOS_BILLING_FIELDS', ['is_active'])
65

    
66
# Queue for billing.
67
QUEUE_CONNECTION = getattr(settings, 'ASTAKOS_QUEUE_CONNECTION', None) # Example: 'rabbitmq://guest:guest@localhost:5672/astakos'
68

    
69
# Set where the user should be redirected after logout
70
LOGOUT_NEXT = getattr(settings, 'ASTAKOS_LOGOUT_NEXT', '')
71

    
72
# Set user email patterns that are automatically activated
73
RE_USER_EMAIL_PATTERNS = getattr(settings, 'ASTAKOS_RE_USER_EMAIL_PATTERNS', [])
74

    
75
# Messages to display on login page header
76
# e.g. {'warning': 'This warning message will be displayed on the top of login page'}
77
LOGIN_MESSAGES = getattr(settings, 'ASTAKOS_LOGIN_MESSAGES', {})
78

    
79
# messages to display as extra actions in account forms
80
# e.g. {'https://cms.okeanos.grnet.gr/': 'Back to ~okeanos'}
81
PROFILE_EXTRA_LINKS = getattr(settings, 'ASTAKOS_PROFILE_EXTRA_LINKS', {})
82

    
83
# The number of unsuccessful login requests per minute allowed for a specific email
84
RATELIMIT_RETRIES_ALLOWED = getattr(settings, 'ASTAKOS_RATELIMIT_RETRIES_ALLOWED', 3)
85

    
86
# If False the email change mechanism is disabled
87
EMAILCHANGE_ENABLED = getattr(settings, 'ASTAKOS_EMAILCHANGE_ENABLED', False)
88

    
89
# Set the expiration time (in days) of email change requests
90
EMAILCHANGE_ACTIVATION_DAYS = getattr(settings, 'ASTAKOS_EMAILCHANGE_ACTIVATION_DAYS', 10)