restore ordering on classement
[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_SAVE_EVERY_REQUEST = True
24SESSION_EXPIRE_AT_BROWSER_CLOSE = True
25
a25e1d5c 26SHORT_DATE_FORMAT = 'd-m-Y'
5e23d90d
OL
27LANGUAGE_CODE = 'fr-ca'
28
29# Absolute path to the directory that holds media.
30# Example: "/home/media/media.lawrence.com/"
31MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'media')
36341125 32PRIVE_MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'media_prive')
5e23d90d 33
63f8af95
OL
34STATICFILES_DIRS = (
35 os.path.join(os.path.dirname(__file__), 'assets'),
36)
37
38
39STATIC_ROOT = os.path.join(os.path.dirname(__file__), 'static')
40STATIC_URL = '/static/'
41
5e23d90d
OL
42# URL that handles the media served from MEDIA_ROOT. Make sure to use a
43# trailing slash if there is a path component (optional in other cases).
44# Examples: "http://media.lawrence.com", "http://example.com/media/"
45MEDIA_URL = '/media/'
a184c555 46PRIVE_MEDIA_URL = '/rh/prive/'
7f25c8a6 47OE_PRIVE_MEDIA_URL = '/recrutement/prive/'
36341125 48
5e23d90d
OL
49# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
50# trailing slash.
51# Examples: "http://foo.com/media/", "/media/".
63f8af95 52#ADMIN_MEDIA_PREFIX = '/media/django/'
5e23d90d
OL
53
54# Don't share this with anybody.
55SECRET_KEY = '^2w#%abp_d+e#(7f5w$leef50)c@4y38cnn#ccji@84$2^rt#l'
56
57MIDDLEWARE_CLASSES = (
58 'django.middleware.common.CommonMiddleware',
59 'django.contrib.sessions.middleware.SessionMiddleware',
9cb4de55 60 'django.contrib.messages.middleware.MessageMiddleware',
5e23d90d
OL
61 'django.contrib.auth.middleware.AuthenticationMiddleware',
62 'django.middleware.doc.XViewMiddleware',
17353922 63 'reversion.middleware.RevisionMiddleware',
5e23d90d
OL
64)
65
66ROOT_URLCONF = 'project.urls'
67
5e23d90d
OL
68INSTALLED_APPS = (
69 'auf.django.skin',
bf6f2712 70 'auf.django.references',
5e23d90d
OL
71 'admin_tools',
72 'admin_tools.theming',
73 'admin_tools.menu',
74 'admin_tools.dashboard',
75 'django.contrib.auth',
76 'django.contrib.contenttypes',
9cb4de55 77 'django.contrib.messages',
5e23d90d
OL
78 'django.contrib.sessions',
79 'django.contrib.admin',
63f8af95 80 'django.contrib.staticfiles',
a194e017 81 'django_qbe',
98bca02b 82 'auf.django.emploi',
fc18c1ca 83 'auf.django.admingroup',
3121c13c 84 'ajax_select',
5e23d90d 85 'south',
17353922 86 'reversion',
e6f52402 87 'auf.django.workflow',
c3f0b49f 88 'auf.django.permissions',
09aa8374 89 #'project.rh_v1',
6ad01c0a 90 'project.rh',
17353922 91 'project.dae',
ca1a7b76 92 'project.legacy',
7ffc5aa4 93 'alphafilter',
cf5662f1 94 'auf.django.emploi',
8ea41642 95 'project.recrutement',
96 'form_utils',
ec517164 97 'tinymce',
86caaf03 98 'captcha',
5e23d90d
OL
99)
100
101TEMPLATE_CONTEXT_PROCESSORS = (
4229d916 102 'django.contrib.auth.context_processors.auth',
5e23d90d
OL
103 'django.core.context_processors.debug',
104 'django.core.context_processors.i18n',
105 'django.core.context_processors.media',
63f8af95 106 'django.core.context_processors.static',
5e23d90d
OL
107 'django.contrib.messages.context_processors.messages',
108 'django.core.context_processors.request',
109 'auf.django.skin.context_processors.auf',
0f844142 110 'project.context_processors.this_employe',
e993f3dc 111 'project.context_processors.user_is_admin',
719b51ec 112 'dae.context_processors.user_in_dae_groupes',
113 'recrutement.context_processors.user_in_recrutement_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 = {
133 'responsables' : ('dae.catalogues', 'Responsable'),
03b395db 134 'dossiers' : ('dae.catalogues', 'Dossier'),
068d1462 135 'postes' : ('dae.catalogues', 'Poste'),
105dd778
OL
136 'pays' : ('rh.catalogues', 'Pays'),
137 'implantations' : ('rh.catalogues', 'Implantation'),
138 'typepostes' : ('rh.catalogues', 'TypePoste'),
139 'postes' : ('rh.catalogues', 'Poste'),
140 'valeurpoints' : ('rh.catalogues', 'ValeurPoint'),
0b0545bd
OL
141 'employes' : ('rh.catalogues', 'Employe'),
142 'dossiers' : ('rh.catalogues', 'Dossier'),
3121c13c 143}
105dd778
OL
144AJAX_SELECT_BOOTSTRAP = True
145AJAX_SELECT_INLINES = 'inline'
146
8ea41642 147
ec517164 148TINYMCE_DEFAULT_CONFIG = {
149'theme': "advanced",
150'plugins':"paste",
151'theme_advanced_buttons1' : "bold,italic,underline,|,formatselect,|,bullist,numlist,|,undo,redo,|,link,unlink",
152'theme_advanced_buttons2' : "",
153'theme_advanced_buttons3' : "",
154'theme_advanced_statusbar_location' : "bottom",
155'theme_advanced_toolbar_align' : "left",
156'theme_advanced_styles' : "Titre=titre;Sous-titre=sous-titre;Normal=normal",
157'width' : "800",
158'height' : "200",
159'theme_advanced_resizing' : "true",
160'custom_undo_redo_levels': 10,
161'theme_advanced_toolbar_location' : 'top',
162'inline_styles' : 'false',
163'paste_use_dialog' : 'false',
164'paste_auto_cleanup_on_paste' : 'true',
165'paste_convert_headers_to_strong' : 'false',
166'paste_strip_class_attributes' : 'all',
167'paste_remove_spans' : 'true',
168'paste_remove_styles' : 'true',
169'content_css' : '/media/css/tinymce.css',
170}
34dad720 171
ca1a7b76
EMS
172DATABASE_ROUTERS = (
173 'project.legacy.DatabaseRouter',
174)
175
34dad720 176# django-sendfile
34dad720 177SENDFILE_BACKEND = 'sendfile.backends.simple'