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