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