[#3068] [#3069] [#3133] Réécriture du rapport de masse salariale
[auf_rh_dae.git] / project / settings.py
CommitLineData
5e23d90d
OL
1# -*- encoding: utf-8 -*-
2
3import os
4import socket
294866db 5from project.conf import * # NOQA
75f0e87b 6
a16928b9 7PROJET_TITRE = "Ressources humaines"
3a2f12b2 8
5e23d90d 9# Rapports d'erreurs
80b95abf 10SERVER_EMAIL = 'ne-pas-repondre@auf.org'
5e23d90d
OL
11EMAIL_SUBJECT_PREFIX = '[auf_rh_dae - %s] ' % socket.gethostname()
12ADMINS = (
13 ('Équipe ARI-SI', 'developpeurs@ca.auf.org'),
14)
15
16MANAGERS = ADMINS
17
1ea6b6e6 18TIME_ZONE = 'America/Montreal'
a25e1d5c
OL
19DATE_FORMAT = 'd-m-Y'
20DATE_INPUT_FORMATS = (
294866db
EMS
21 '%d-%m-%Y', '%d/%m/%Y', '%d %m %Y',
22 '%d-%m-%y', '%d/%m/%y', '%d %m %y',
a25e1d5c
OL
23)
24
920f297c
JPC
25SESSION_SAVE_EVERY_REQUEST = True
26SESSION_EXPIRE_AT_BROWSER_CLOSE = True
27
a25e1d5c 28SHORT_DATE_FORMAT = 'd-m-Y'
5e23d90d 29LANGUAGE_CODE = 'fr-ca'
fc62be5d
EMS
30USE_L10N = True
31USE_THOUSAND_SEPARATOR = True
5e23d90d
OL
32
33# Absolute path to the directory that holds media.
34# Example: "/home/media/media.lawrence.com/"
35MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'media')
36341125 36PRIVE_MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'media_prive')
5e23d90d 37
63f8af95
OL
38STATICFILES_DIRS = (
39 os.path.join(os.path.dirname(__file__), 'assets'),
40)
41
42
43STATIC_ROOT = os.path.join(os.path.dirname(__file__), 'static')
44STATIC_URL = '/static/'
45
5e23d90d
OL
46# URL that handles the media served from MEDIA_ROOT. Make sure to use a
47# trailing slash if there is a path component (optional in other cases).
48# Examples: "http://media.lawrence.com", "http://example.com/media/"
49MEDIA_URL = '/media/'
5be60939 50PRIVE_MEDIA_URL = '/prive/'
7f25c8a6 51OE_PRIVE_MEDIA_URL = '/recrutement/prive/'
36341125 52
5e23d90d
OL
53# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
54# trailing slash.
55# Examples: "http://foo.com/media/", "/media/".
63f8af95 56#ADMIN_MEDIA_PREFIX = '/media/django/'
5e23d90d
OL
57
58# Don't share this with anybody.
59SECRET_KEY = '^2w#%abp_d+e#(7f5w$leef50)c@4y38cnn#ccji@84$2^rt#l'
60
61MIDDLEWARE_CLASSES = (
62 'django.middleware.common.CommonMiddleware',
63 'django.contrib.sessions.middleware.SessionMiddleware',
9cb4de55 64 'django.contrib.messages.middleware.MessageMiddleware',
5e23d90d
OL
65 'django.contrib.auth.middleware.AuthenticationMiddleware',
66 'django.middleware.doc.XViewMiddleware',
17353922 67 'reversion.middleware.RevisionMiddleware',
5e23d90d
OL
68)
69
70ROOT_URLCONF = 'project.urls'
71
5e23d90d
OL
72INSTALLED_APPS = (
73 'auf.django.skin',
bf6f2712 74 'auf.django.references',
0c104342
DB
75 'auf.django.emploi',
76 'auf.django.admingroup',
77 'auf.django.workflow',
78 'auf.django.permissions',
79 'auf.django.emploi',
5e23d90d
OL
80 'admin_tools',
81 'admin_tools.theming',
82 'admin_tools.menu',
83 'admin_tools.dashboard',
fc62be5d 84 'django.contrib.admin',
5e23d90d
OL
85 'django.contrib.auth',
86 'django.contrib.contenttypes',
fc62be5d 87 'django.contrib.humanize',
9cb4de55 88 'django.contrib.messages',
5e23d90d 89 'django.contrib.sessions',
63f8af95 90 'django.contrib.staticfiles',
a194e017 91 'django_qbe',
3121c13c 92 'ajax_select',
5e23d90d 93 'south',
17353922 94 'reversion',
7ffc5aa4 95 'alphafilter',
8ea41642 96 'form_utils',
ec517164 97 'tinymce',
86caaf03 98 'captcha',
0c104342
DB
99 'project.rh',
100 'project.dae',
101 'project.recrutement',
5e23d90d
OL
102)
103
104TEMPLATE_CONTEXT_PROCESSORS = (
4229d916 105 'django.contrib.auth.context_processors.auth',
5e23d90d
OL
106 'django.core.context_processors.debug',
107 'django.core.context_processors.i18n',
108 'django.core.context_processors.media',
63f8af95 109 'django.core.context_processors.static',
5e23d90d
OL
110 'django.contrib.messages.context_processors.messages',
111 'django.core.context_processors.request',
112 'auf.django.skin.context_processors.auf',
ef71b858 113 'project.dae.context_processors.user_in_dae_groupes',
5e23d90d
OL
114)
115
8846b99e
OL
116AUTHENTICATION_BACKENDS = (
117 'auf.django.auth.backends.CascadeBackend',
c3f0b49f 118 'auf.django.permissions.backends.AuthenticationBackend',
8846b99e 119)
f8daa167 120LOGIN_URL = "/connexion"
5afb3da6 121LOGIN_REDIRECT_URL = "/"
5e23d90d 122
5e23d90d
OL
123TEMPLATE_DIRS = (
124 os.path.join(os.path.dirname(__file__), "templates"),
125)
126
127
8846b99e 128ADMIN_TOOLS_INDEX_DASHBOARD = 'project.dashboard.CustomIndexDashboard'
7f43054e 129ADMIN_TOOLS_APP_INDEX_DASHBOARD = 'project.dashboard.CustomAppIndexDashboard'
6f38ca31 130ADMIN_TOOLS_MENU = 'project.menu.CustomMenu'
3121c13c
OL
131
132AJAX_LOOKUP_CHANNELS = {
294866db
EMS
133 'responsables': ('project.dae.catalogues', 'Responsable'),
134 'dossiers': ('project.dae.catalogues', 'Dossier'),
135 'dae_postes': ('project.dae.catalogues', 'Poste'),
136 'pays': ('project.rh.catalogues', 'Pays'),
137 'implantations': ('project.rh.catalogues', 'Implantation'),
138 'typepostes': ('project.rh.catalogues', 'TypePoste'),
139 'postes': ('project.rh.catalogues', 'Poste'),
140 'valeurpoints': ('project.rh.catalogues', 'ValeurPoint'),
141 'employes': ('project.rh.catalogues', 'Employe'),
142 'dossiers': ('project.rh.catalogues', 'Dossier'),
3121c13c 143}
105dd778
OL
144AJAX_SELECT_INLINES = 'inline'
145
8ea41642 146
ec517164 147TINYMCE_DEFAULT_CONFIG = {
294866db
EMS
148 'theme': "advanced",
149 'plugins': "paste",
150 'theme_advanced_buttons1': (
151 "bold,italic,underline,|,formatselect,|,bullist,numlist,|,undo,redo,|,"
152 "link,unlink"
153 ),
154 'theme_advanced_buttons2': "",
155 'theme_advanced_buttons3': "",
156 'theme_advanced_statusbar_location': "bottom",
157 'theme_advanced_toolbar_align': "left",
158 'theme_advanced_styles': "Titre=titre;Sous-titre=sous-titre;Normal=normal",
159 'width': "800",
160 'height': "200",
161 'theme_advanced_resizing': "true",
162 'custom_undo_redo_levels': 10,
163 'theme_advanced_toolbar_location': 'top',
164 'inline_styles': 'false',
165 'paste_use_dialog': 'false',
166 'paste_auto_cleanup_on_paste': 'true',
167 'paste_convert_headers_to_strong': 'false',
168 'paste_strip_class_attributes': 'all',
169 'paste_remove_spans': 'true',
170 'paste_remove_styles': 'true',
171 'content_css': '/media/css/tinymce.css',
ec517164 172}
34dad720
EMS
173
174# django-sendfile
34dad720 175SENDFILE_BACKEND = 'sendfile.backends.simple'
361d53e1
PP
176
177QBE_DISPLAY_DATABASES = False
ddf236b3
PP
178
179# Il est *très* important de respecter la case.
180QBE_CUSTOM_MODELS = {'Rh': {
181 'Employe': {},
182 'Poste': {},
183 'Dossier': {},
184 'Remuneration': {},
185 'Contrat': {},
186}}
972e7cf1
PP
187
188QBE_ALLOWED_FIELDS = {'Rh': {
294866db
EMS
189 'Employe': [
190 'nom', 'prenom', 'genre', 'date_naissance', 'situation_familiale',
191 'date_entree'
192 ],
972e7cf1 193 'Poste': ['nom', 'date_debut', 'date_fin'],
294866db
EMS
194 'Dossier': [
195 'statut_residence', 'regime_travail',
196 'regime_travail_nb_heure_semaine', 'date_debut', 'date_fin'
197 ],
972e7cf1
PP
198 'Remuneration': ['montant', 'date_debut', 'date_fin'],
199 'Contrat': ['date_debut', 'date_fin'],
200}}