Statistics
| Branch: | Tag: | Revision:

root / djnro / local_settings.py.dist @ 7da9123d

History | View | Annotate | Download (6 kB)

1
import os
2
from django.utils.translation import ugettext as _
3
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
4
PROJECT_DIR = os.path.join(BASE_DIR, 'djnro')
5

    
6
# This should be always False
7
DEBUG = False
8
TEMPLATE_DEBUG = DEBUG
9

    
10
ADMINS = (
11
    ('admin', 'admin@example.org'),
12
)
13

    
14
MANAGERS = ADMINS
15

    
16
# Hosts/domain names that are valid for this site; required if DEBUG is False
17
# See https://docs.djangoproject.com/en/1.4/ref/settings/#allowed-hosts
18
ALLOWED_HOSTS = []
19

    
20
# Make this unique, and don't share it with anybody.
21
SECRET_KEY = '<put something really random here, eg. %$#%@#$^2312351345#$%3452345@#$%@#$234#@$hhzdavfsdcFDGVFSDGhn>'
22

    
23
DATABASES = {
24
    'default': {
25
        'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
26
        'NAME': '',                      # Or path to database file if using sqlite3.
27
        'USER': '',                      # Not used with sqlite3.
28
        'PASSWORD': '',                  # Not used with sqlite3.
29
        'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
30
        'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
31
        'STORAGE_ENGINE': 'INNODB',
32
    }
33
}
34

    
35
STATIC_URL = '/static/'
36

    
37
##### LDAP BACKEND ######
38
EXTRA_AUTHENTICATION_BACKENDS = (
39
    # 'django_auth_ldap.backend.LDAPBackend',
40
)
41

    
42
# LDAP CONFIG
43

    
44
# import ldap
45
# from django_auth_ldap.config import LDAPSearch, GroupOfNamesType
46

    
47
# AUTH_LDAP_BIND_DN = ""
48
# AUTH_LDAP_BIND_PASSWORD = ""
49
# AUTH_LDAP_SERVER_URI = "ldap://foo.bar.org"
50
# AUTH_LDAP_START_TLS = True
51
# AUTH_LDAP_USER_SEARCH = LDAPSearch("ou=People, dc=bar, dc=foo", ldap.SCOPE_SUBTREE, "(uid=%(user)s)")
52

    
53
# AUTH_LDAP_USER_ATTR_MAP = {
54
#       "first_name":"givenName",
55
#       "last_name": "sn",
56
#       "email": "mail
57
#       }
58

    
59
# Set up the basic group parameters.
60

    
61
# AUTH_LDAP_GROUP_SEARCH = LDAPSearch(
62
#     "ou=Groups,dc=foo,dc=bar,dc=org",ldap.SCOPE_SUBTREE, objectClass=groupOfNames"
63
# )
64

    
65
# AUTH_LDAP_GROUP_TYPE = GroupOfNamesType()
66

    
67
# AUTH_LDAP_USER_FLAGS_BY_GROUP = {
68
#     "is_active": "cn=NOC, ou=Groups, dc=foo, dc=bar, dc=org",
69
#     "is_staff": "cn=staff, ou=Groups, dc=foo, dc=bar, dc=org",
70
#     "is_superuser": "cn=NOC, ou=Groups,dc=foo, dc=bar, dc=org"
71
# }
72

    
73

    
74
SHIB_AUTH_ENTITLEMENT = 'urn:mace:example.com:pki:user'
75
SHIB_LOGOUT_URL = 'https://example.com/Shibboleth.sso/Logout'
76

    
77
SERVER_EMAIL = "Example domain eduroam Service <noreply@example.com>"
78
EMAIL_SUBJECT_PREFIX = "[eduroam] "
79
ACCOUNT_ACTIVATION_DAYS = 7
80
NOTIFY_ADMIN_MAILS = ["mail1@example.com", "mail2@example.com"]
81

    
82
#### CACHE BACKEND ####
83
# For development instances you can deploy the provided dummy cache backend
84
CACHES = {
85
    'default': {
86
        'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
87
        'TIMEOUT': 60,
88
    }
89
}
90

    
91
# For production instances enable memcache
92
# CACHES = {
93
#     'default': {
94
#         'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
95
#         'TIMEOUT': 60, # default is 300
96
#         'LOCATION': '127.0.0.1:11211',
97
#     }
98
# }
99

    
100
# Local time zone for this installation. Choices can be found here:
101
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
102
# although not all choices may be available on all operating systems.
103
# In a Windows environment this must be set to your system time zone.
104
TIME_ZONE = 'Europe/Athens'
105

    
106

    
107
# map center (lat, lng)
108
MAP_CENTER = (36.97, 23.71)
109

    
110
# Frontend country specific vars, eg. Greece
111
NRO_COUNTRY_NAME = _('My Country')
112
# Variable used by context_processor to display the "eduroam | <country_code>" in base.html
113
NRO_COUNTRY_CODE = 'tld'
114
# main domain url used in right top icon, eg. http://www.grnet.gr
115
NRO_DOMAIN_MAIN_URL = "http://www.example.com"
116
# developer info for footer
117
NRO_PROV_BY_DICT = {"name": "GRNET NOC", "url": "//noc.grnet.gr"}
118
#provider social media contact (Use: // to preserve https)
119
NRO_PROV_SOCIAL_MEDIA_CONTACT = [
120
    {"url": "//facebook.com/noc.grnet.gr", "icon":"/static/img/facebook_img.png", "name":"Facebook"},
121
    {"url": "//twitter.com/grnetnoc", "icon":"/static/img/twitter_img.png", "name":"Twitter"},
122
]
123

    
124
#Helpdesk, used in base.html:
125
NRO_DOMAIN_HELPDESK_DICT = {"name": _("Domain Helpdesk"), 'email':'helpdesk@example.com', 'phone': '12324567890', 'uri': 'helpdesk.example.com'}
126

    
127
#Countries for Realm model:
128
REALM_COUNTRIES = (
129
    ('country_2letters', 'Country' ),
130
)
131

    
132
#Shibboleth attribute map
133
SHIB_USERNAME = ['HTTP_EPPN']
134
SHIB_MAIL = ['mail', 'HTTP_MAIL', 'HTTP_SHIB_INETORGPERSON_MAIL']
135
SHIB_FIRSTNAME = ['HTTP_SHIB_INETORGPERSON_GIVENNAME']
136
SHIB_LASTNAME = ['HTTP_SHIB_PERSON_SURNAME']
137
SHIB_ENTITLEMENT = ['HTTP_SHIB_EP_ENTITLEMENT']
138

    
139
# DJANGO SOCIAL AUTH PLUGIN SETTINGS
140
SOCIAL_AUTH_TWITTER_KEY = ''
141
SOCIAL_AUTH_TWITTER_SECRET = ''
142

    
143
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = ''
144
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = ''
145
SOCIAL_AUTH_GOOGLE_OAUTH2_SCOPE = []
146

    
147
###### eduroam CAT integration ###########
148
# In order to enable provisioning to CAT, you must list at least one instance and the
149
# corresponding description in CAT_INSTANCES. Beware that pages accessible by end users
150
# currently only show CAT information for the instance named 'production'.
151
# You must also set the following parameters for each CAT instance in CAT_AUTH:
152
# CAT_API_KEY: API key for authentication to CAT
153
# CAT_API_URL: API endpoint URL
154
# CAT_PROFILES_URL: Base URL for Intitution Download Area pages
155
# CAT_FEDMGMT_URL: URL For Federation Overview page (currently not in use)
156

    
157
# CAT_INSTANCES = (
158
#     ('production', 'cat.eduroam.org'),
159
#     ('testing', 'cat-test.eduroam.org'),
160
# )
161

    
162
# CAT_AUTH = {
163
#     'production': {
164
#         "CAT_API_KEY": "<provided API key>",
165
#         "CAT_API_URL": "https://cat.eduroam.org/admin/API.php",
166
#         "CAT_PROFILES_URL": "https://cat.eduroam.org/",
167
#         "CAT_FEDMGMT_URL": "https://cat.eduroam.org/admin/overview_federation.php"
168
#     },
169
#     'testing': {
170
#         "CAT_API_KEY": "<provided API key>",
171
#         "CAT_API_URL": "https://cat-test.eduroam.org/test/admin/API.php",
172
#         "CAT_PROFILES_URL": "https://cat-test.eduroam.org/test",
173
#         "CAT_FEDMGMT_URL": "https://cat-test.eduroam.org/test/admin/overview_federation.php"
174
#     },
175
# }