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