change IM_MEDIA_URL to IM_STATIC_URL
[astakos] / astakos / im / settings.py
1 from django.conf import settings
2 from os.path import abspath, dirname, join
3
4 PROJECT_PATH = getattr(settings, 'PROJECT_PATH', dirname(dirname(abspath(__file__))))
5
6 # Set the expiration time of newly created auth tokens
7 # to be this many hours after their creation time.
8 AUTH_TOKEN_DURATION = getattr(settings, 'ASTAKOS_AUTH_TOKEN_DURATION', 30 * 24)
9
10 # Bypass authentication for user administration.
11 BYPASS_ADMIN_AUTH = getattr(settings, 'ASTAKOS_BYPASS_ADMIN_AUTH', False)
12
13 # Show these many users per page in admin interface.
14 ADMIN_PAGE_LIMIT = getattr(settings, 'ASTAKOS_ADMIN_PAGE_LIMIT', 100)
15
16 # Authenticate via Twitter.
17 TWITTER_KEY = getattr(settings, 'ASTAKOS_TWITTER_KEY', '')
18 TWITTER_SECRET = getattr(settings, 'ASTAKOS_TWITTER_SECRET', '')
19
20 DEFAULT_USER_LEVEL = getattr(settings, 'ASTAKOS_DEFAULT_USER_LEVEL', 4)
21
22 INVITATIONS_PER_LEVEL = getattr(settings, 'ASTAKOS_INVITATIONS_PER_LEVEL', {
23     0   :   100,
24     1   :   2,
25     2   :   0,
26     3   :   0,
27     4   :   0
28 })
29
30 # Address to use for outgoing emails
31 DEFAULT_FROM_EMAIL = getattr(settings, 'ASTAKOS_DEFAULT_FROM_EMAIL', '%s <no-reply@grnet.gr>')
32 DEFAULT_CONTACT_EMAIL = getattr(settings, 'ASTAKOS_DEFAULT_CONTACT_EMAIL', 'support@%s.grnet.gr')
33
34 # Identity Management enabled modules
35 IM_MODULES = getattr(settings, 'ASTAKOS_IM_MODULES', ['local', 'twitter', 'shibboleth'])
36
37 # Force user profile verification
38 FORCE_PROFILE_UPDATE = getattr(settings, 'ASTAKOS_FORCE_PROFILE_UPDATE', True)
39
40 #Enable invitations
41 INVITATIONS_ENABLED = getattr(settings, 'ASTAKOS_INVITATIONS_ENABLED', True)
42
43 # The URL where requests are redirected for login, especially when using the login_required() decorator.
44 LOGIN_URL = getattr(settings, 'ASTAKOS_LOGIN_URL', '/im')
45
46 COOKIE_NAME = getattr(settings, 'ASTAKOS_COOKIE_NAME', '_pithos2_a')
47 COOKIE_DOMAIN = getattr(settings, 'ASTAKOS_COOKIE_DOMAIN', None)
48
49 IM_STATIC_URL = getattr(settings, 'ASTAKOS_IM_STATIC_URL', '/im/static/im/')
50
51 # SQLAlchemy (choose SQLite/MySQL/PostgreSQL).
52 BACKEND_DB_MODULE =  getattr(settings, 'PITHOS_BACKEND_DB_MODULE', 'pithos.backends.lib.sqlalchemy')
53 BACKEND_DB_CONNECTION = getattr(settings, 'PITHOS_BACKEND_DB_CONNECTION', 'sqlite:///' + join(PROJECT_PATH, 'backend.db'))
54
55 # Block storage.
56 BACKEND_BLOCK_MODULE = getattr(settings, 'PITHOS_BACKEND_BLOCK_MODULE', 'pithos.backends.lib.hashfiler')
57 BACKEND_BLOCK_PATH = getattr(settings, 'PITHOS_BACKEND_BLOCK_PATH', join(PROJECT_PATH, 'data/'))
58
59 # Default setting for new accounts.
60 BACKEND_QUOTA = getattr(settings, 'PITHOS_BACKEND_QUOTA', 50 * 1024 * 1024 * 1024)
61 BACKEND_VERSIONING = getattr(settings, 'PITHOS_BACKEND_VERSIONING', 'auto')
62