1 # Copyright (C) 2012 Oregon State University
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License
5 # as published by the Free Software Foundation; either version 2
6 # of the License, or (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
19 Default settings for GWM.
21 These settings are hopefully so universal that they never need to change
22 between deployments and are factored out into this module to avoid stale
23 settings.py files causing upgrade bugs.
25 All settings in this module can be overriden in the main settings.py module,
30 "AUTH_PROFILE_MODULE",
33 "TEMPLATE_CONTEXT_PROCESSORS",
39 # Horrible Django hack for convincing Django that we are i18n'd.
43 # List of callables that know how to import templates from various sources.
45 'django.template.loaders.filesystem.Loader',
46 'django.template.loaders.app_directories.Loader',
49 TEMPLATE_CONTEXT_PROCESSORS
= (
50 'django.contrib.auth.context_processors.auth',
51 'django.contrib.messages.context_processors.messages',
52 'django.core.context_processors.debug',
53 'django.core.context_processors.i18n',
54 'django.core.context_processors.request',
55 'django.core.context_processors.static',
56 'ganeti_web.context_processors.site',
57 'ganeti_web.context_processors.common_permissions',
60 # Middleware. Order matters; these are all applied *in the order given*.
61 MIDDLEWARE_CLASSES
= (
62 'django.middleware.common.CommonMiddleware',
63 # Transaction middleware is early so that it can apply to all later
65 'django.middleware.transaction.TransactionMiddleware',
66 'django.middleware.csrf.CsrfViewMiddleware',
67 'django.contrib.sessions.middleware.SessionMiddleware',
68 'django.middleware.locale.LocaleMiddleware',
69 'django.contrib.auth.middleware.AuthenticationMiddleware',
70 'django.contrib.messages.middleware.MessageMiddleware',
71 'ganeti_web.middleware.PermissionDeniedMiddleware',
75 'django.contrib.auth',
76 'django.contrib.contenttypes',
77 "django.contrib.formtools",
78 'django.contrib.messages',
79 'django.contrib.sessions',
80 'django.contrib.sites',
81 'django.contrib.staticfiles',
83 # ganeti_web must come before object_permissions in order to migrate from
84 # 0.7 or older successfully.
97 # The model that contains extra user profile stuff.
98 AUTH_PROFILE_MODULE
= 'ganeti_web.Profile'