[#3195] Réparé la génération des choix de fuseaux horaires
[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
CR
8
9ADMINS = (
ff024488 10 ('Équipe ARI-SI', 'developpeurs@ca.auf.org'),
155a7c62
CR
11)
12
8cda4c7d
PP
13ADMINS_SEP = ('gilles.deggis@auf.org',)
14
155a7c62
CR
15MANAGERS = ADMINS
16
31249cf3 17TIME_ZONE = 'America/Montreal'
155a7c62 18
d15017b2 19LANGUAGE_CODE = 'fr-ca'
155a7c62
CR
20
21# Absolute path to the directory that holds media.
22# Example: "/home/media/media.lawrence.com/"
31249cf3 23MEDIA_ROOT = os.path.join(PROJECT_HOME, 'media')
155a7c62
CR
24
25# URL that handles the media served from MEDIA_ROOT. Make sure to use a
26# trailing slash if there is a path component (optional in other cases).
27# Examples: "http://media.lawrence.com", "http://example.com/media/"
28MEDIA_URL = '/media/'
29
7a355faa
AJ
30# List of callables that know how to import templates from various sources.
31TEMPLATE_LOADERS = (
32 'django.template.loaders.filesystem.load_template_source',
33 'django.template.loaders.app_directories.load_template_source',
34# 'django.template.loaders.eggs.load_template_source',
35)
36
155a7c62 37MIDDLEWARE_CLASSES = (
1629c43d 38 'django.middleware.cache.UpdateCacheMiddleware',
8a335360 39 'django.middleware.gzip.GZipMiddleware',
155a7c62
CR
40 'django.middleware.common.CommonMiddleware',
41 'django.contrib.sessions.middleware.SessionMiddleware',
42 'django.contrib.auth.middleware.AuthenticationMiddleware',
aac1254a 43 'django.contrib.messages.middleware.MessageMiddleware',
1629c43d 44 'django.middleware.cache.FetchFromCacheMiddleware',
518d0b44 45 'chercheurs.middleware.ChercheurMiddleware',
9f1770cf 46 'djangoflash.middleware.FlashMiddleware',
7a355faa 47 'pagination.middleware.PaginationMiddleware',
155a7c62
CR
48 'django.middleware.doc.XViewMiddleware',
49)
50
0cc5f772 51ROOT_URLCONF = 'auf_savoirs_en_partage.urls'
155a7c62 52
155a7c62 53INSTALLED_APPS = (
6d885e0c 54 'admin_tools',
55 'admin_tools.theming',
56 'admin_tools.menu',
57 'admin_tools.dashboard',
aac1254a 58 'django.contrib.admin',
155a7c62
CR
59 'django.contrib.auth',
60 'django.contrib.contenttypes',
aac1254a 61 'django.contrib.messages',
155a7c62 62 'django.contrib.sessions',
31249cf3 63 'django.contrib.staticfiles',
7a355faa 64 'pagination',
6ef8ead4 65 'django_roa',
d15017b2 66 'savoirs',
932eef9a 67 'chercheurs',
bab65667 68 'sitotheque',
5212238e 69 'djangosphinx',
f78371b2
EMS
70 'south',
71 'auf.django.admingroup',
693c606b 72 'auf.django.references',
b1d4c7ac 73 'alphafilter',
933268d6 74 'interfaces',
c4312cce 75 'rappels',
693c606b 76 'pytz',
155a7c62
CR
77)
78
9af73c99 79TEMPLATE_CONTEXT_PROCESSORS = (
31249cf3 80 "django.contrib.auth.context_processors.auth",
9af73c99
AJ
81 "django.core.context_processors.debug",
82 "django.core.context_processors.i18n",
83 "django.core.context_processors.media",
84 "django.core.context_processors.request",
bae03b7b 85 "context_processors.discipline_region",
aac1254a
EMS
86 "djangoflash.context_processors.flash",
87 'django.contrib.messages.context_processors.messages',
9af73c99 88)
bae03b7b 89
155a7c62 90TEMPLATE_LOADERS = (
31249cf3
EMS
91 'django.template.loaders.filesystem.Loader',
92 'django.template.loaders.app_directories.Loader',
155a7c62
CR
93)
94
95TEMPLATE_DIRS = (
31249cf3 96 os.path.join(PROJECT_HOME, "templates"),
155a7c62
CR
97)
98
695930dd 99AUTHENTICATION_BACKENDS = (
31249cf3 100 'auf.django.auth.backends.CascadeBackend',
695930dd
EMS
101 'authentification.PersonneBackend',
102 'django.contrib.auth.backends.ModelBackend',
103)
f1df3ff6
EMS
104AUTH_PROFILE_MODULE = 'savoirs.Profile'
105
f67f66aa 106LOGIN_URL = '/chercheurs/connexion/'
518d0b44 107LOGIN_REDIRECT_URL = '/chercheurs/perso/'
5fa0c5a4 108
31249cf3
EMS
109CACHES = {
110 'default': {
111 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
112 'LOCATION': 'localhost:11211'
113 }
114}
6525d9ce 115
31249cf3
EMS
116ADMIN_TOOLS_INDEX_DASHBOARD = \
117 'auf_savoirs_en_partage.dashboard.CustomIndexDashboard'
9c29b8d4 118ADMIN_TOOLS_MENU = 'auf_savoirs_en_partage.menu.CustomMenu'
6d885e0c 119
0e9597af
AJ
120CONTACT_EMAIL = 'contact-savoirsenpartage@auf.org'
121
31249cf3
EMS
122LOCALE_PATHS = (
123 os.path.join(PROJECT_HOME, 'locale'),
124)
125
126# djangosphinx
127
5212238e
EMS
128SPHINX_API_VERSION = 0x116
129SPHINX_PORT = 9312
130
31249cf3
EMS
131# django.contrib.staticfiles
132
133STATICFILES_DIRS = (
134 os.path.join(PROJECT_HOME, 'static'),
135)
136STATIC_URL = '/static/'
137STATIC_ROOT = os.path.join(HOME, 'sitestatic')
138STATICFILES_FINDERS = (
139 'django.contrib.staticfiles.finders.FileSystemFinder',
140 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
31249cf3 141)
fcda8bb5
EMS
142STATICFILES_STORAGE = \
143 'django.contrib.staticfiles.storage.CachedStaticFilesStorage'