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