1d31b2aea443240b97192085314fb787d280b607
[auf_savoirs_en_partage_django.git] / auf_savoirs_en_partage / settings.py
1 # -*- encoding: utf-8 -*-
2
3 import os
4 from conf import * # NOQA
5
6 PROJECT_HOME = os.path.dirname(__file__)
7 HOME = os.path.dirname(PROJECT_HOME)
8
9 ADMINS = (
10 ('Équipe ARI-SI', 'developpeurs@ca.auf.org'),
11 )
12
13 ADMINS_SEP = ('gilles.deggis@auf.org',)
14
15 MANAGERS = ADMINS
16
17 TIME_ZONE = 'America/Montreal'
18
19 LANGUAGE_CODE = 'fr-ca'
20
21 # Absolute path to the directory that holds media.
22 # Example: "/home/media/media.lawrence.com/"
23 MEDIA_ROOT = os.path.join(PROJECT_HOME, 'media')
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/"
28 MEDIA_URL = '/media/'
29
30 # List of callables that know how to import templates from various sources.
31 TEMPLATE_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
37 MIDDLEWARE_CLASSES = (
38 'django.middleware.cache.UpdateCacheMiddleware',
39 'django.middleware.gzip.GZipMiddleware',
40 'django.middleware.common.CommonMiddleware',
41 'django.contrib.sessions.middleware.SessionMiddleware',
42 'django.contrib.auth.middleware.AuthenticationMiddleware',
43 'django.contrib.messages.middleware.MessageMiddleware',
44 'django.middleware.cache.FetchFromCacheMiddleware',
45 'chercheurs.middleware.ChercheurMiddleware',
46 'djangoflash.middleware.FlashMiddleware',
47 'pagination.middleware.PaginationMiddleware',
48 'django.middleware.doc.XViewMiddleware',
49 )
50
51 ROOT_URLCONF = 'auf_savoirs_en_partage.urls'
52
53 INSTALLED_APPS = (
54 'admin_tools',
55 'admin_tools.theming',
56 'admin_tools.menu',
57 'admin_tools.dashboard',
58 'django.contrib.admin',
59 'django.contrib.auth',
60 'django.contrib.contenttypes',
61 'django.contrib.messages',
62 'django.contrib.sessions',
63 'django.contrib.staticfiles',
64 'pagination',
65 'django_roa',
66 'savoirs',
67 'chercheurs',
68 'sitotheque',
69 'djangosphinx',
70 'south',
71 'auf.django.admingroup',
72 'auf.django.references',
73 'alphafilter',
74 'interfaces',
75 'rappels',
76 'pytz',
77 )
78
79 TEMPLATE_CONTEXT_PROCESSORS = (
80 "django.contrib.auth.context_processors.auth",
81 "django.core.context_processors.debug",
82 "django.core.context_processors.i18n",
83 "django.core.context_processors.media",
84 "django.core.context_processors.request",
85 "context_processors.discipline_region",
86 "djangoflash.context_processors.flash",
87 'django.contrib.messages.context_processors.messages',
88 )
89
90 TEMPLATE_LOADERS = (
91 'django.template.loaders.filesystem.Loader',
92 'django.template.loaders.app_directories.Loader',
93 )
94
95 TEMPLATE_DIRS = (
96 os.path.join(PROJECT_HOME, "templates"),
97 )
98
99 AUTHENTICATION_BACKENDS = (
100 'auf.django.auth.backends.CascadeBackend',
101 'authentification.PersonneBackend',
102 'django.contrib.auth.backends.ModelBackend',
103 )
104 AUTH_PROFILE_MODULE = 'savoirs.Profile'
105
106 LOGIN_URL = '/chercheurs/connexion/'
107 LOGIN_REDIRECT_URL = '/chercheurs/perso/'
108
109 CACHES = {
110 'default': {
111 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
112 'LOCATION': 'localhost:11211'
113 }
114 }
115
116 ADMIN_TOOLS_INDEX_DASHBOARD = \
117 'auf_savoirs_en_partage.dashboard.CustomIndexDashboard'
118 ADMIN_TOOLS_MENU = 'auf_savoirs_en_partage.menu.CustomMenu'
119
120 CONTACT_EMAIL = 'contact-savoirsenpartage@auf.org'
121
122 LOCALE_PATHS = (
123 os.path.join(PROJECT_HOME, 'locale'),
124 )
125
126 # djangosphinx
127
128 SPHINX_API_VERSION = 0x116
129 SPHINX_PORT = 9312
130
131 # django.contrib.staticfiles
132
133 STATICFILES_DIRS = (
134 os.path.join(PROJECT_HOME, 'static'),
135 )
136 STATIC_URL = '/static/'
137 STATIC_ROOT = os.path.join(HOME, 'sitestatic')
138 STATICFILES_FINDERS = (
139 'django.contrib.staticfiles.finders.FileSystemFinder',
140 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
141 )
142 STATICFILES_STORAGE = \
143 'django.contrib.staticfiles.storage.CachedStaticFilesStorage'