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',
61 MIDDLEWARE_CLASSES = (
62 'django.contrib.sessions.middleware.SessionMiddleware',
63 'django.middleware.common.CommonMiddleware',
64 'django.middleware.csrf.CsrfViewMiddleware',
65 'django.contrib.auth.middleware.AuthenticationMiddleware',
66 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
67 'django.contrib.messages.middleware.MessageMiddleware',
68 'django.middleware.clickjacking.XFrameOptionsMiddleware',
71 ROOT_URLCONF = 'mandayejs.urls'
73 WSGI_APPLICATION = 'mandayejs.wsgi.application'
77 # https://docs.djangoproject.com/en/1.7/ref/settings/#databases
81 'ENGINE': 'django.db.backends.sqlite3',
82 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
86 # Internationalization
87 # https://docs.djangoproject.com/en/1.7/topics/i18n/
89 LANGUAGE_CODE = 'en-us'
100 # Static files (CSS, JavaScript, Images)
101 # https://docs.djangoproject.com/en/1.7/howto/static-files/
103 STATIC_URL = '/_mandaye/static/'
105 # Serve xstatic files, required for gadjo
106 STATICFILES_FINDERS = global_settings.STATICFILES_FINDERS + \
107 ('gadjo.finders.XStaticFinder',)
109 LOGIN_URL = 'auth_login'
110 LOGIN_REDIRECT_URL = 'post-login'
112 local_settings_file = os.environ.get('MANDAYEJS_SETTINGS_FILE',
113 os.path.join(os.path.dirname(__file__), 'local_settings.py'))
114 if os.path.exists(local_settings_file):
115 execfile(local_settings_file)