root / snf-astakos-app / astakos / im / settings.py @ 1cbce16f
History | View | Annotate | Download (4.3 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_CONTACT_EMAIL = getattr(settings, 'ASTAKOS_DEFAULT_CONTACT_EMAIL', 'support@cloud.grnet.gr') |
23 |
|
24 |
# Identity Management enabled modules
|
25 |
IM_MODULES = getattr(settings, 'ASTAKOS_IM_MODULES', ['local', 'shibboleth']) |
26 |
|
27 |
# Force user profile verification
|
28 |
FORCE_PROFILE_UPDATE = getattr(settings, 'ASTAKOS_FORCE_PROFILE_UPDATE', True) |
29 |
|
30 |
#Enable invitations
|
31 |
INVITATIONS_ENABLED = getattr(settings, 'ASTAKOS_INVITATIONS_ENABLED', True) |
32 |
|
33 |
COOKIE_NAME = getattr(settings, 'ASTAKOS_COOKIE_NAME', '_pithos2_a') |
34 |
COOKIE_DOMAIN = getattr(settings, 'ASTAKOS_COOKIE_DOMAIN', None) |
35 |
COOKIE_SECURE = getattr(settings, 'ASTAKOS_COOKIE_SECURE', True) |
36 |
|
37 |
IM_STATIC_URL = getattr(settings, 'ASTAKOS_IM_STATIC_URL', '/static/im/') |
38 |
|
39 |
# If set to False and invitations not enabled newly created user will be automatically accepted
|
40 |
MODERATION_ENABLED = getattr(settings, 'ASTAKOS_MODERATION_ENABLED', True) |
41 |
|
42 |
# Set baseurl
|
43 |
BASEURL = getattr(settings, 'ASTAKOS_BASEURL', 'http://pithos.dev.grnet.gr') |
44 |
|
45 |
# Set service name
|
46 |
SITENAME = getattr(settings, 'ASTAKOS_SITENAME', 'GRNET Cloud') |
47 |
|
48 |
# Set recaptcha keys
|
49 |
RECAPTCHA_PUBLIC_KEY = getattr(settings, 'ASTAKOS_RECAPTCHA_PUBLIC_KEY', '') |
50 |
RECAPTCHA_PRIVATE_KEY = getattr(settings, 'ASTAKOS_RECAPTCHA_PRIVATE_KEY', '') |
51 |
RECAPTCHA_OPTIONS = getattr(settings, 'ASTAKOS_RECAPTCHA_OPTIONS', |
52 |
{'theme' : 'custom', 'custom_theme_widget': 'okeanos_recaptcha'}) |
53 |
RECAPTCHA_USE_SSL = getattr(settings, 'ASTAKOS_RECAPTCHA_USE_SSL', True) |
54 |
RECAPTCHA_ENABLED = getattr(settings, 'ASTAKOS_RECAPTCHA_ENABLED', True) |
55 |
|
56 |
# set AstakosUser fields to propagate in the billing system
|
57 |
BILLING_FIELDS = getattr(settings, 'ASTAKOS_BILLING_FIELDS', ['is_active']) |
58 |
|
59 |
# Queue for billing.
|
60 |
QUEUE_CONNECTION = getattr(settings, 'ASTAKOS_QUEUE_CONNECTION', None) # Example: 'rabbitmq://guest:guest@localhost:5672/astakos' |
61 |
|
62 |
# Set where the user should be redirected after logout
|
63 |
LOGOUT_NEXT = getattr(settings, 'ASTAKOS_LOGOUT_NEXT', '') |
64 |
|
65 |
# Set user email patterns that are automatically activated
|
66 |
RE_USER_EMAIL_PATTERNS = getattr(settings, 'ASTAKOS_RE_USER_EMAIL_PATTERNS', []) |
67 |
|
68 |
# Messages to display on login page header
|
69 |
# e.g. {'warning': 'This warning message will be displayed on the top of login page'}
|
70 |
LOGIN_MESSAGES = getattr(settings, 'ASTAKOS_LOGIN_MESSAGES', {}) |
71 |
|
72 |
# Messages to display on login page header
|
73 |
# e.g. {'warning': 'This warning message will be displayed on the top of signup page'}
|
74 |
SIGNUP_MESSAGES = getattr(settings, 'ASTAKOS_SIGNUP_MESSAGES', {}) |
75 |
|
76 |
# Messages to display on login page header
|
77 |
# e.g. {'warning': 'This warning message will be displayed on the top of profile page'}
|
78 |
PROFILE_MESSAGES = getattr(settings, 'ASTAKOS_PROFILE_MESSAGES', {}) |
79 |
|
80 |
# Messages to display on all pages
|
81 |
# e.g. {'warning': 'This warning message will be displayed on the top of every page'}
|
82 |
GLOBAL_MESSAGES = getattr(settings, 'ASTAKOS_GLOBAL_MESSAGES', {}) |
83 |
|
84 |
# messages to display as extra actions in account forms
|
85 |
# e.g. {'https://cms.okeanos.grnet.gr/': 'Back to ~okeanos'}
|
86 |
PROFILE_EXTRA_LINKS = getattr(settings, 'ASTAKOS_PROFILE_EXTRA_LINKS', {}) |
87 |
|
88 |
# The number of unsuccessful login requests per minute allowed for a specific user
|
89 |
RATELIMIT_RETRIES_ALLOWED = getattr(settings, 'ASTAKOS_RATELIMIT_RETRIES_ALLOWED', 3) |
90 |
|
91 |
# If False the email change mechanism is disabled
|
92 |
EMAILCHANGE_ENABLED = getattr(settings, 'ASTAKOS_EMAILCHANGE_ENABLED', False) |
93 |
|
94 |
# Set the expiration time (in days) of email change requests
|
95 |
EMAILCHANGE_ACTIVATION_DAYS = getattr(settings, 'ASTAKOS_EMAILCHANGE_ACTIVATION_DAYS', 10) |
96 |
|
97 |
# Set the astakos main functions logging severity (None to disable)
|
98 |
from logging import INFO |
99 |
LOGGING_LEVEL = getattr(settings, 'ASTAKOS_LOGGING_LEVEL', INFO) |
100 |
|
101 |
# Set the quota holder component URI
|
102 |
QUOTA_HOLDER_URL = getattr(settings, 'ASTAKOS_QUOTA_HOLDER_URL', '') |