date format jj-mm-aaaa
[auf_rh_dae.git] / project / settings.py
CommitLineData
5e23d90d
OL
1# -*- encoding: utf-8 -*-
2
3import os
4import socket
5from conf import *
6
8ea41642 7
a16928b9 8PROJET_TITRE = "Ressources humaines"
3a2f12b2 9
5e23d90d
OL
10# Rapports d'erreurs
11EMAIL_SUBJECT_PREFIX = '[auf_rh_dae - %s] ' % socket.gethostname()
12ADMINS = (
13 ('Équipe ARI-SI', 'developpeurs@ca.auf.org'),
14)
15
16MANAGERS = ADMINS
17
18TIME_ZONE = 'Canada/Montreal'
a25e1d5c
OL
19DATE_FORMAT = 'd-m-Y'
20DATE_INPUT_FORMATS = (
21 '%d-%m-%Y', '%d/%m/%Y', '%d %m %Y',
22 '%d-%m-%y', '%d/%m/%y', '%d %m %y',
23)
24
25SHORT_DATE_FORMAT = 'd-m-Y'
5e23d90d
OL
26LANGUAGE_CODE = 'fr-ca'
27
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
OL
32
33# URL that handles the media served from MEDIA_ROOT. Make sure to use a
34# trailing slash if there is a path component (optional in other cases).
35# Examples: "http://media.lawrence.com", "http://example.com/media/"
36MEDIA_URL = '/media/'
d3cb467a 37PRIVE_MEDIA_URL = '/dae/prive/'
7f25c8a6 38OE_PRIVE_MEDIA_URL = '/recrutement/prive/'
36341125 39
5e23d90d
OL
40
41# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
42# trailing slash.
43# Examples: "http://foo.com/media/", "/media/".
21f749ab 44ADMIN_MEDIA_PREFIX = '/media/django/'
5e23d90d
OL
45
46# Don't share this with anybody.
47SECRET_KEY = '^2w#%abp_d+e#(7f5w$leef50)c@4y38cnn#ccji@84$2^rt#l'
48
49MIDDLEWARE_CLASSES = (
50 'django.middleware.common.CommonMiddleware',
51 'django.contrib.sessions.middleware.SessionMiddleware',
9cb4de55 52 'django.contrib.messages.middleware.MessageMiddleware',
5e23d90d
OL
53 'django.contrib.auth.middleware.AuthenticationMiddleware',
54 'django.middleware.doc.XViewMiddleware',
17353922 55 'reversion.middleware.RevisionMiddleware',
5e23d90d
OL
56)
57
58ROOT_URLCONF = 'project.urls'
59
5e23d90d
OL
60INSTALLED_APPS = (
61 'auf.django.skin',
62 'admin_tools',
63 'admin_tools.theming',
64 'admin_tools.menu',
65 'admin_tools.dashboard',
66 'django.contrib.auth',
67 'django.contrib.contenttypes',
9cb4de55 68 'django.contrib.messages',
5e23d90d
OL
69 'django.contrib.sessions',
70 'django.contrib.admin',
a194e017 71 'django_qbe',
98bca02b 72 'auf.django.emploi',
fc18c1ca 73 'auf.django.admingroup',
3121c13c 74 'ajax_select',
5e23d90d 75 'south',
17353922 76 'reversion',
428e3c0b 77 'project.rh',
e6f52402 78 'auf.django.workflow',
c3f0b49f 79 'auf.django.permissions',
785c03cc 80 'project.rh_v1',
6ad01c0a 81 'project.rh',
17353922 82 'project.dae',
7ffc5aa4 83 'alphafilter',
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',
d04d084c 98 #'project.context_processors.utilisateur',
0f844142 99 'project.context_processors.this_employe',
e993f3dc 100 'project.context_processors.user_is_admin',
719b51ec 101 'dae.context_processors.user_in_dae_groupes',
102 'recrutement.context_processors.user_in_recrutement_groupes',
5e23d90d
OL
103)
104
8846b99e
OL
105AUTHENTICATION_BACKENDS = (
106 'auf.django.auth.backends.CascadeBackend',
c3f0b49f 107 'auf.django.permissions.backends.AuthenticationBackend',
8846b99e 108)
f8daa167 109LOGIN_URL = "/connexion"
5afb3da6 110LOGIN_REDIRECT_URL = "/"
5e23d90d
OL
111
112TEMPLATE_LOADERS = (
113 'django.template.loaders.filesystem.load_template_source',
114 'django.template.loaders.app_directories.load_template_source',
115)
116
117TEMPLATE_DIRS = (
118 os.path.join(os.path.dirname(__file__), "templates"),
119)
120
121
8846b99e 122ADMIN_TOOLS_INDEX_DASHBOARD = 'project.dashboard.CustomIndexDashboard'
7f43054e 123ADMIN_TOOLS_APP_INDEX_DASHBOARD = 'project.dashboard.CustomAppIndexDashboard'
6f38ca31 124ADMIN_TOOLS_MENU = 'project.menu.CustomMenu'
3121c13c
OL
125
126AJAX_LOOKUP_CHANNELS = {
127 'responsables' : ('dae.catalogues', 'Responsable'),
03b395db 128 'dossiers' : ('dae.catalogues', 'Dossier'),
068d1462 129 'postes' : ('dae.catalogues', 'Poste'),
3121c13c 130}
8ea41642 131
ec517164 132TINYMCE_DEFAULT_CONFIG = {
133'theme': "advanced",
134'plugins':"paste",
135'theme_advanced_buttons1' : "bold,italic,underline,|,formatselect,|,bullist,numlist,|,undo,redo,|,link,unlink",
136'theme_advanced_buttons2' : "",
137'theme_advanced_buttons3' : "",
138'theme_advanced_statusbar_location' : "bottom",
139'theme_advanced_toolbar_align' : "left",
140'theme_advanced_styles' : "Titre=titre;Sous-titre=sous-titre;Normal=normal",
141'width' : "800",
142'height' : "200",
143'theme_advanced_resizing' : "true",
144'custom_undo_redo_levels': 10,
145'theme_advanced_toolbar_location' : 'top',
146'inline_styles' : 'false',
147'paste_use_dialog' : 'false',
148'paste_auto_cleanup_on_paste' : 'true',
149'paste_convert_headers_to_strong' : 'false',
150'paste_strip_class_attributes' : 'all',
151'paste_remove_spans' : 'true',
152'paste_remove_styles' : 'true',
153'content_css' : '/media/css/tinymce.css',
154}
34dad720
EMS
155
156# django-sendfile
34dad720 157SENDFILE_BACKEND = 'sendfile.backends.simple'