1 # mandayejs - saml reverse proxy
2 # Copyright (C) 2015 Entr'ouvert
4 # This program is free software: you can redistribute it and/or modify it
5 # under the terms of the GNU Affero General Public License as published
6 # by the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU Affero General Public License for more details.
14 # You should have received a copy of the GNU Affero General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 Django settings for mandayejs project.
20 For more information on this file, see
21 https://docs.djangoproject.com/en/1.7/topics/settings/
23 For the full list of settings and their values, see
24 https://docs.djangoproject.com/en/1.7/ref/settings/
27 from django.conf import global_settings
29 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
31 BASE_DIR = os.path.dirname(os.path.dirname(__file__))
34 # Quick-start development settings - unsuitable for production
35 # See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
37 # SECURITY WARNING: keep the secret key used in production secret!
38 SECRET_KEY = 'xlf$@r5j*6p5-l#q=bg&t$mlhf=v@fq9^xfs#%712zndtu2#2@'
40 # SECURITY WARNING: don't run with debug turned on in production!
48 # Application definition
51 'django.contrib.admin',
52 'django.contrib.auth',
53 'django.contrib.contenttypes',
54 'django.contrib.sessions',
55 'django.contrib.messages',
56 'django.contrib.staticfiles',
60 MIDDLEWARE_CLASSES = (
61 'django.contrib.sessions.middleware.SessionMiddleware',
62 'django.middleware.common.CommonMiddleware',
63 'django.middleware.csrf.CsrfViewMiddleware',
64 'django.contrib.auth.middleware.AuthenticationMiddleware',
65 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
66 'django.contrib.messages.middleware.MessageMiddleware',
67 'django.middleware.clickjacking.XFrameOptionsMiddleware',
70 ROOT_URLCONF = 'mandayejs.urls'
72 WSGI_APPLICATION = 'mandayejs.wsgi.application'
76 # https://docs.djangoproject.com/en/1.7/ref/settings/#databases
80 'ENGINE': 'django.db.backends.sqlite3',
81 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
85 # Internationalization
86 # https://docs.djangoproject.com/en/1.7/topics/i18n/
88 LANGUAGE_CODE = 'en-us'
99 # Static files (CSS, JavaScript, Images)
100 # https://docs.djangoproject.com/en/1.7/howto/static-files/
102 STATIC_URL = '/_mandaye/static/'
104 # Serve xstatic files, required for gadjo
105 STATICFILES_FINDERS = global_settings.STATICFILES_FINDERS + \
106 ('gadjo.finders.XStaticFinder',)
109 os.path.join(BASE_DIR, 'mandayejs', 'static'),
113 os.path.join(BASE_DIR, 'mandayejs', 'templates'),
116 LOGIN_URL = 'auth_login'
117 LOGIN_REDIRECT_URL = 'post-login'
119 local_settings_file = os.environ.get('MANDAYEJS_SETTINGS_FILE',
120 os.path.join(os.path.dirname(__file__), 'local_settings.py'))
121 if os.path.exists(local_settings_file):
122 execfile(local_settings_file)