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