Add more information on deploying; fix format.
[ganeti_webmgr.git] / ganeti_web / settings.py
blob35fb5c40aa57d14257e40a07fa2c79d101f27857
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,
16 # USA.
18 """
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,
26 of course.
27 """
29 __all__ = (
30 "AUTH_PROFILE_MODULE",
31 "INSTALLED_APPS",
32 "MIDDLEWARE_CLASSES",
33 "TEMPLATE_CONTEXT_PROCESSORS",
34 "TEMPLATE_LOADERS",
35 "ugettext",
39 # Horrible Django hack for convincing Django that we are i18n'd.
40 def ugettext(s):
41 return s
43 # List of callables that know how to import templates from various sources.
44 TEMPLATE_LOADERS = (
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.static',
55 'ganeti_web.context_processors.site',
56 'ganeti_web.context_processors.common_permissions',
59 # Middleware. Order matters; these are all applied *in the order given*.
60 MIDDLEWARE_CLASSES = (
61 'django.middleware.common.CommonMiddleware',
62 # Transaction middleware is early so that it can apply to all later
63 # middlewares.
64 'django.middleware.transaction.TransactionMiddleware',
65 'django.middleware.csrf.CsrfViewMiddleware',
66 'django.contrib.sessions.middleware.SessionMiddleware',
67 'django.middleware.locale.LocaleMiddleware',
68 'django.contrib.auth.middleware.AuthenticationMiddleware',
69 'django.contrib.messages.middleware.MessageMiddleware',
70 'ganeti_web.middleware.Http403Middleware',
73 INSTALLED_APPS = (
74 'django.contrib.auth',
75 'django.contrib.contenttypes',
76 "django.contrib.formtools",
77 'django.contrib.messages',
78 'django.contrib.sessions',
79 'django.contrib.sites',
80 'django.contrib.staticfiles',
81 'registration',
82 # ganeti_web must come before object_permissions in order to migrate from
83 # 0.7 or older successfully.
84 'ganeti_web',
85 'object_permissions',
86 'object_log',
87 'south',
88 'haystack',
89 'muddle',
90 'muddle.shots',
91 'muddle_users',
92 'include_strip_tag',
95 # The model that contains extra user profile stuff.
96 AUTH_PROFILE_MODULE = 'ganeti_web.Profile'