pong
[auf_savoirs_en_partage_django.git] / auf_savoirs_en_partage / settings.py
CommitLineData
6525d9ce 1# -*- encoding: utf-8 -*-
155a7c62
CR
2
3import os
31249cf3
EMS
4from conf import * # NOQA
5
6PROJECT_HOME = os.path.dirname(__file__)
7HOME = os.path.dirname(PROJECT_HOME)
155a7c62 8
ddf3b479
OL
9ADMINS = ()
10
11LOGGING = {
12 'version': 1,
13 'disable_existing_loggers': True,
14 'root': {
15 'level': 'WARNING',
16 'handlers': ['sentry'],
17 },
18 'formatters': {
19 'verbose': {
20 'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
21 },
22 },
23 'handlers': {
24 'sentry': {
25 'level': 'WARNING',
26 'class': 'raven.contrib.django.handlers.SentryHandler',
27 },
28 'console': {
29 'level': 'DEBUG',
30 'class': 'logging.StreamHandler',
31 'formatter': 'verbose'
32 }
33 },
34 'loggers': {
35 'django.db.backends': {
36 'level': 'ERROR',
37 'handlers': ['console'],
38 'propagate': False,
39 },
40 'raven': {
41 'level': 'DEBUG',
42 'handlers': ['console'],
43 'propagate': False,
44 },
45 'sentry.errors': {
46 'level': 'DEBUG',
47 'handlers': ['console'],
48 'propagate': False,
49 },
50 },
51}
155a7c62 52
8cda4c7d
PP
53ADMINS_SEP = ('gilles.deggis@auf.org',)
54
155a7c62
CR
55MANAGERS = ADMINS
56
31249cf3 57TIME_ZONE = 'America/Montreal'
155a7c62 58
d15017b2 59LANGUAGE_CODE = 'fr-ca'
155a7c62
CR
60
61# Absolute path to the directory that holds media.
62# Example: "/home/media/media.lawrence.com/"
31249cf3 63MEDIA_ROOT = os.path.join(PROJECT_HOME, 'media')
155a7c62
CR
64
65# URL that handles the media served from MEDIA_ROOT. Make sure to use a
66# trailing slash if there is a path component (optional in other cases).
67# Examples: "http://media.lawrence.com", "http://example.com/media/"
68MEDIA_URL = '/media/'
69
7a355faa
AJ
70# List of callables that know how to import templates from various sources.
71TEMPLATE_LOADERS = (
72 'django.template.loaders.filesystem.load_template_source',
73 'django.template.loaders.app_directories.load_template_source',
74# 'django.template.loaders.eggs.load_template_source',
75)
76
155a7c62 77MIDDLEWARE_CLASSES = (
1629c43d 78 'django.middleware.cache.UpdateCacheMiddleware',
e998eaa5 79# 'django.middleware.gzip.GZipMiddleware',
155a7c62
CR
80 'django.middleware.common.CommonMiddleware',
81 'django.contrib.sessions.middleware.SessionMiddleware',
82 'django.contrib.auth.middleware.AuthenticationMiddleware',
36e40848 83 'auf.django.piwik.middleware.TrackMiddleware',
aac1254a 84 'django.contrib.messages.middleware.MessageMiddleware',
1629c43d 85 'django.middleware.cache.FetchFromCacheMiddleware',
518d0b44 86 'chercheurs.middleware.ChercheurMiddleware',
9f1770cf 87 'djangoflash.middleware.FlashMiddleware',
7a355faa 88 'pagination.middleware.PaginationMiddleware',
155a7c62
CR
89 'django.middleware.doc.XViewMiddleware',
90)
91
0cc5f772 92ROOT_URLCONF = 'auf_savoirs_en_partage.urls'
155a7c62 93
155a7c62 94INSTALLED_APPS = (
6d885e0c 95 'admin_tools',
96 'admin_tools.theming',
97 'admin_tools.menu',
98 'admin_tools.dashboard',
aac1254a 99 'django.contrib.admin',
155a7c62
CR
100 'django.contrib.auth',
101 'django.contrib.contenttypes',
aac1254a 102 'django.contrib.messages',
155a7c62 103 'django.contrib.sessions',
31249cf3 104 'django.contrib.staticfiles',
7a355faa 105 'pagination',
6ef8ead4 106 'django_roa',
d15017b2 107 'savoirs',
932eef9a 108 'chercheurs',
bab65667 109 'sitotheque',
5212238e 110 'djangosphinx',
f78371b2 111 'south',
ddf3b479 112 'raven.contrib.django',
f78371b2 113 'auf.django.admingroup',
693c606b 114 'auf.django.references',
b33d7b0a 115 'auf.django.pong',
b1d4c7ac 116 'alphafilter',
933268d6 117 'interfaces',
c4312cce 118 'rappels',
693c606b 119 'pytz',
155a7c62
CR
120)
121
9af73c99 122TEMPLATE_CONTEXT_PROCESSORS = (
31249cf3 123 "django.contrib.auth.context_processors.auth",
9af73c99
AJ
124 "django.core.context_processors.debug",
125 "django.core.context_processors.i18n",
126 "django.core.context_processors.media",
127 "django.core.context_processors.request",
bae03b7b 128 "context_processors.discipline_region",
aac1254a
EMS
129 "djangoflash.context_processors.flash",
130 'django.contrib.messages.context_processors.messages',
9af73c99 131)
bae03b7b 132
155a7c62 133TEMPLATE_LOADERS = (
31249cf3
EMS
134 'django.template.loaders.filesystem.Loader',
135 'django.template.loaders.app_directories.Loader',
155a7c62
CR
136)
137
138TEMPLATE_DIRS = (
31249cf3 139 os.path.join(PROJECT_HOME, "templates"),
155a7c62
CR
140)
141
695930dd 142AUTHENTICATION_BACKENDS = (
31249cf3 143 'auf.django.auth.backends.CascadeBackend',
695930dd
EMS
144 'authentification.PersonneBackend',
145 'django.contrib.auth.backends.ModelBackend',
146)
f1df3ff6
EMS
147AUTH_PROFILE_MODULE = 'savoirs.Profile'
148
f67f66aa 149LOGIN_URL = '/chercheurs/connexion/'
518d0b44 150LOGIN_REDIRECT_URL = '/chercheurs/perso/'
5fa0c5a4 151
31249cf3
EMS
152CACHES = {
153 'default': {
154 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
155 'LOCATION': 'localhost:11211'
156 }
157}
6525d9ce 158
31249cf3
EMS
159ADMIN_TOOLS_INDEX_DASHBOARD = \
160 'auf_savoirs_en_partage.dashboard.CustomIndexDashboard'
9c29b8d4 161ADMIN_TOOLS_MENU = 'auf_savoirs_en_partage.menu.CustomMenu'
6d885e0c 162
0e9597af
AJ
163CONTACT_EMAIL = 'contact-savoirsenpartage@auf.org'
164
31249cf3
EMS
165LOCALE_PATHS = (
166 os.path.join(PROJECT_HOME, 'locale'),
167)
168
88f4d825
OL
169SOUTH_TESTS_MIGRATE = False
170
31249cf3
EMS
171# djangosphinx
172
5212238e
EMS
173SPHINX_API_VERSION = 0x116
174SPHINX_PORT = 9312
175
31249cf3
EMS
176# django.contrib.staticfiles
177
178STATICFILES_DIRS = (
179 os.path.join(PROJECT_HOME, 'static'),
180)
181STATIC_URL = '/static/'
182STATIC_ROOT = os.path.join(HOME, 'sitestatic')
183STATICFILES_FINDERS = (
184 'django.contrib.staticfiles.finders.FileSystemFinder',
185 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
31249cf3 186)
fcda8bb5
EMS
187STATICFILES_STORAGE = \
188 'django.contrib.staticfiles.storage.CachedStaticFilesStorage'