Merge branch 'nilovna' into dev
[auf_savoirs_en_partage_django.git] / auf_savoirs_en_partage / settings.py
1 # -*- encoding: utf-8 -*-
2
3 import os
4 from conf import *
5
6 ADMINS = (
7 ('Équipe ARI-SI', 'developpeurs@ca.auf.org'),
8 )
9
10 ADMINS_SEP = ('gilles.deggis@auf.org',)
11
12 MANAGERS = ADMINS
13
14 TIME_ZONE = 'America/Chicago'
15
16 LANGUAGE_CODE = 'fr-ca'
17
18 # Absolute path to the directory that holds media.
19 # Example: "/home/media/media.lawrence.com/"
20 MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'media')
21
22 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
23 # trailing slash if there is a path component (optional in other cases).
24 # Examples: "http://media.lawrence.com", "http://example.com/media/"
25 MEDIA_URL = '/media/'
26
27 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
28 # trailing slash.
29 # Examples: "http://foo.com/media/", "/media/".
30 ADMIN_MEDIA_PREFIX = '/admin_media/'
31
32 # List of callables that know how to import templates from various sources.
33 TEMPLATE_LOADERS = (
34 'django.template.loaders.filesystem.load_template_source',
35 'django.template.loaders.app_directories.load_template_source',
36 # 'django.template.loaders.eggs.load_template_source',
37 )
38
39 MIDDLEWARE_CLASSES = (
40 'django.middleware.cache.UpdateCacheMiddleware',
41 'django.middleware.gzip.GZipMiddleware',
42 'django.middleware.common.CommonMiddleware',
43 'django.contrib.sessions.middleware.SessionMiddleware',
44 'django.contrib.auth.middleware.AuthenticationMiddleware',
45 'django.middleware.cache.FetchFromCacheMiddleware',
46 'chercheurs.middleware.ChercheurMiddleware',
47 'djangoflash.middleware.FlashMiddleware',
48 'pagination.middleware.PaginationMiddleware',
49 'django.middleware.doc.XViewMiddleware',
50 )
51
52 ROOT_URLCONF = 'auf_savoirs_en_partage.urls'
53
54
55 INSTALLED_APPS = (
56 'admin_tools',
57 'admin_tools.theming',
58 'admin_tools.menu',
59 'admin_tools.dashboard',
60 'django.contrib.auth',
61 'django.contrib.contenttypes',
62 'django.contrib.sessions',
63 'django.contrib.admin',
64 'pagination',
65 'compressor',
66 'django_roa',
67 'savoirs',
68 'chercheurs',
69 'sitotheque',
70 'djangosphinx',
71 'south',
72 'auf.django.admingroup',
73 'auf.django.references',
74 'alphafilter',
75 'interfaces',
76 'rappels',
77 'pytz',
78 )
79
80 TEMPLATE_CONTEXT_PROCESSORS = (
81 # default : http://docs.djangoproject.com/en/dev/ref/settings/?from=olddocs#template-context-processors
82 "django.core.context_processors.auth",
83 "django.core.context_processors.debug",
84 "django.core.context_processors.i18n",
85 "django.core.context_processors.media",
86 "django.core.context_processors.request",
87 "context_processors.discipline_region",
88 "djangoflash.context_processors.flash"
89 )
90
91 TEMPLATE_LOADERS = (
92 'django.template.loaders.filesystem.load_template_source',
93 'django.template.loaders.app_directories.load_template_source',
94 )
95
96 TEMPLATE_DIRS = (
97 os.path.join(os.path.dirname(__file__), "templates"),
98 )
99
100 AUTHENTICATION_BACKENDS = (
101 'auf.django.auth.backends.CascadeBackend', #'authentification.AUFBackend',
102 'authentification.PersonneBackend',
103 'django.contrib.auth.backends.ModelBackend',
104 )
105 AUTH_PROFILE_MODULE = 'savoirs.Profile'
106
107 LOGIN_URL = '/chercheurs/connexion/'
108 LOGIN_REDIRECT_URL = '/chercheurs/perso/'
109
110 CACHE_BACKEND = 'memcached://localhost:11211'
111 CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True
112
113 ROA_CUSTOM_ARGS = {'api-key': ROA_API_KEY}
114
115 ADMIN_TOOLS_INDEX_DASHBOARD = 'auf_savoirs_en_partage.dashboard.CustomIndexDashboard'
116 ADMIN_TOOLS_MENU = 'auf_savoirs_en_partage.menu.CustomMenu'
117
118 CONTACT_EMAIL = 'contact-savoirsenpartage@auf.org'
119
120 SPHINX_API_VERSION = 0x116
121 SPHINX_PORT = 9312
122
123 from auf_references_client.settings import *