DRY sur les commentaires des apercus
[auf_rh_dae.git] / project / settings.py
CommitLineData
5e23d90d
OL
1# -*- encoding: utf-8 -*-
2
3import os
4import socket
5from conf import *
a16928b9 6PROJET_TITRE = "Ressources humaines"
3a2f12b2 7
5e23d90d
OL
8# Rapports d'erreurs
9EMAIL_SUBJECT_PREFIX = '[auf_rh_dae - %s] ' % socket.gethostname()
10ADMINS = (
11 ('Équipe ARI-SI', 'developpeurs@ca.auf.org'),
12)
13
14MANAGERS = ADMINS
15
1ea6b6e6 16TIME_ZONE = 'America/Montreal'
a25e1d5c
OL
17DATE_FORMAT = 'd-m-Y'
18DATE_INPUT_FORMATS = (
19 '%d-%m-%Y', '%d/%m/%Y', '%d %m %Y',
20 '%d-%m-%y', '%d/%m/%y', '%d %m %y',
21)
22
920f297c
JPC
23SESSION_COOKIE_AGE = 1800 #60 secondes * 30 minutes = 1800
24SESSION_SAVE_EVERY_REQUEST = True
25SESSION_EXPIRE_AT_BROWSER_CLOSE = True
26
a25e1d5c 27SHORT_DATE_FORMAT = 'd-m-Y'
5e23d90d
OL
28LANGUAGE_CODE = 'fr-ca'
29
30# Absolute path to the directory that holds media.
31# Example: "/home/media/media.lawrence.com/"
32MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'media')
36341125 33PRIVE_MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'media_prive')
5e23d90d
OL
34
35# URL that handles the media served from MEDIA_ROOT. Make sure to use a
36# trailing slash if there is a path component (optional in other cases).
37# Examples: "http://media.lawrence.com", "http://example.com/media/"
38MEDIA_URL = '/media/'
a184c555 39PRIVE_MEDIA_URL = '/rh/prive/'
7f25c8a6 40OE_PRIVE_MEDIA_URL = '/recrutement/prive/'
36341125 41
5e23d90d
OL
42
43# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
44# trailing slash.
45# Examples: "http://foo.com/media/", "/media/".
21f749ab 46ADMIN_MEDIA_PREFIX = '/media/django/'
5e23d90d
OL
47
48# Don't share this with anybody.
49SECRET_KEY = '^2w#%abp_d+e#(7f5w$leef50)c@4y38cnn#ccji@84$2^rt#l'
50
51MIDDLEWARE_CLASSES = (
52 'django.middleware.common.CommonMiddleware',
53 'django.contrib.sessions.middleware.SessionMiddleware',
9cb4de55 54 'django.contrib.messages.middleware.MessageMiddleware',
5e23d90d
OL
55 'django.contrib.auth.middleware.AuthenticationMiddleware',
56 'django.middleware.doc.XViewMiddleware',
17353922 57 'reversion.middleware.RevisionMiddleware',
5e23d90d
OL
58)
59
60ROOT_URLCONF = 'project.urls'
61
5e23d90d
OL
62INSTALLED_APPS = (
63 'auf.django.skin',
bf6f2712 64 'auf.django.references',
5e23d90d
OL
65 'admin_tools',
66 'admin_tools.theming',
67 'admin_tools.menu',
68 'admin_tools.dashboard',
69 'django.contrib.auth',
70 'django.contrib.contenttypes',
9cb4de55 71 'django.contrib.messages',
5e23d90d
OL
72 'django.contrib.sessions',
73 'django.contrib.admin',
a194e017 74 'django_qbe',
98bca02b 75 'auf.django.emploi',
fc18c1ca 76 'auf.django.admingroup',
3121c13c 77 'ajax_select',
5e23d90d 78 'south',
17353922 79 'reversion',
e6f52402 80 'auf.django.workflow',
c3f0b49f 81 'auf.django.permissions',
09aa8374 82 #'project.rh_v1',
6ad01c0a 83 'project.rh',
17353922 84 'project.dae',
ca1a7b76 85 'project.legacy',
7ffc5aa4 86 'alphafilter',
cf5662f1 87 'auf.django.emploi',
8ea41642 88 'project.recrutement',
89 'form_utils',
ec517164 90 'tinymce',
86caaf03 91 'captcha',
5e23d90d
OL
92)
93
94TEMPLATE_CONTEXT_PROCESSORS = (
95 'django.core.context_processors.auth',
96 'django.core.context_processors.debug',
97 'django.core.context_processors.i18n',
98 'django.core.context_processors.media',
99 'django.contrib.messages.context_processors.messages',
100 'django.core.context_processors.request',
101 'auf.django.skin.context_processors.auf',
0f844142 102 'project.context_processors.this_employe',
e993f3dc 103 'project.context_processors.user_is_admin',
719b51ec 104 'dae.context_processors.user_in_dae_groupes',
105 'recrutement.context_processors.user_in_recrutement_groupes',
5e23d90d
OL
106)
107
8846b99e
OL
108AUTHENTICATION_BACKENDS = (
109 'auf.django.auth.backends.CascadeBackend',
c3f0b49f 110 'auf.django.permissions.backends.AuthenticationBackend',
8846b99e 111)
f8daa167 112LOGIN_URL = "/connexion"
5afb3da6 113LOGIN_REDIRECT_URL = "/"
5e23d90d 114
5e23d90d
OL
115TEMPLATE_DIRS = (
116 os.path.join(os.path.dirname(__file__), "templates"),
117)
118
119
8846b99e 120ADMIN_TOOLS_INDEX_DASHBOARD = 'project.dashboard.CustomIndexDashboard'
7f43054e 121ADMIN_TOOLS_APP_INDEX_DASHBOARD = 'project.dashboard.CustomAppIndexDashboard'
6f38ca31 122ADMIN_TOOLS_MENU = 'project.menu.CustomMenu'
3121c13c
OL
123
124AJAX_LOOKUP_CHANNELS = {
125 'responsables' : ('dae.catalogues', 'Responsable'),
03b395db 126 'dossiers' : ('dae.catalogues', 'Dossier'),
068d1462 127 'postes' : ('dae.catalogues', 'Poste'),
105dd778
OL
128 'pays' : ('rh.catalogues', 'Pays'),
129 'implantations' : ('rh.catalogues', 'Implantation'),
130 'typepostes' : ('rh.catalogues', 'TypePoste'),
131 'postes' : ('rh.catalogues', 'Poste'),
132 'valeurpoints' : ('rh.catalogues', 'ValeurPoint'),
0b0545bd
OL
133 'employes' : ('rh.catalogues', 'Employe'),
134 'dossiers' : ('rh.catalogues', 'Dossier'),
3121c13c 135}
105dd778
OL
136AJAX_SELECT_BOOTSTRAP = True
137AJAX_SELECT_INLINES = 'inline'
138
8ea41642 139
ec517164 140TINYMCE_DEFAULT_CONFIG = {
141'theme': "advanced",
142'plugins':"paste",
143'theme_advanced_buttons1' : "bold,italic,underline,|,formatselect,|,bullist,numlist,|,undo,redo,|,link,unlink",
144'theme_advanced_buttons2' : "",
145'theme_advanced_buttons3' : "",
146'theme_advanced_statusbar_location' : "bottom",
147'theme_advanced_toolbar_align' : "left",
148'theme_advanced_styles' : "Titre=titre;Sous-titre=sous-titre;Normal=normal",
149'width' : "800",
150'height' : "200",
151'theme_advanced_resizing' : "true",
152'custom_undo_redo_levels': 10,
153'theme_advanced_toolbar_location' : 'top',
154'inline_styles' : 'false',
155'paste_use_dialog' : 'false',
156'paste_auto_cleanup_on_paste' : 'true',
157'paste_convert_headers_to_strong' : 'false',
158'paste_strip_class_attributes' : 'all',
159'paste_remove_spans' : 'true',
160'paste_remove_styles' : 'true',
161'content_css' : '/media/css/tinymce.css',
162}
34dad720 163
ca1a7b76
EMS
164DATABASE_ROUTERS = (
165 'project.legacy.DatabaseRouter',
166)
167
34dad720 168# django-sendfile
34dad720 169SENDFILE_BACKEND = 'sendfile.backends.simple'