PEP8
[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 8# Rapports d'erreurs
80b95abf 9SERVER_EMAIL = 'ne-pas-repondre@auf.org'
5e23d90d
OL
10EMAIL_SUBJECT_PREFIX = '[auf_rh_dae - %s] ' % socket.gethostname()
11ADMINS = (
12 ('Équipe ARI-SI', 'developpeurs@ca.auf.org'),
13)
14
15MANAGERS = ADMINS
16
1ea6b6e6 17TIME_ZONE = 'America/Montreal'
a25e1d5c
OL
18DATE_FORMAT = 'd-m-Y'
19DATE_INPUT_FORMATS = (
20 '%d-%m-%Y', '%d/%m/%Y', '%d %m %Y',
21 '%d-%m-%y', '%d/%m/%y', '%d %m %y',
22)
23
920f297c
JPC
24SESSION_SAVE_EVERY_REQUEST = True
25SESSION_EXPIRE_AT_BROWSER_CLOSE = True
26
a25e1d5c 27SHORT_DATE_FORMAT = 'd-m-Y'
5e23d90d
OL
28LANGUAGE_CODE = 'fr-ca'
29
30# Absolute path to the directory that holds media.
31# Example: "/home/media/media.lawrence.com/"
32MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'media')
36341125 33PRIVE_MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'media_prive')
5e23d90d 34
63f8af95
OL
35STATICFILES_DIRS = (
36 os.path.join(os.path.dirname(__file__), 'assets'),
37)
38
39
40STATIC_ROOT = os.path.join(os.path.dirname(__file__), 'static')
41STATIC_URL = '/static/'
42
5e23d90d
OL
43# URL that handles the media served from MEDIA_ROOT. Make sure to use a
44# trailing slash if there is a path component (optional in other cases).
45# Examples: "http://media.lawrence.com", "http://example.com/media/"
46MEDIA_URL = '/media/'
5be60939 47PRIVE_MEDIA_URL = '/prive/'
7f25c8a6 48OE_PRIVE_MEDIA_URL = '/recrutement/prive/'
36341125 49
5e23d90d
OL
50# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
51# trailing slash.
52# Examples: "http://foo.com/media/", "/media/".
63f8af95 53#ADMIN_MEDIA_PREFIX = '/media/django/'
5e23d90d
OL
54
55# Don't share this with anybody.
56SECRET_KEY = '^2w#%abp_d+e#(7f5w$leef50)c@4y38cnn#ccji@84$2^rt#l'
57
58MIDDLEWARE_CLASSES = (
59 'django.middleware.common.CommonMiddleware',
60 'django.contrib.sessions.middleware.SessionMiddleware',
9cb4de55 61 'django.contrib.messages.middleware.MessageMiddleware',
5e23d90d
OL
62 'django.contrib.auth.middleware.AuthenticationMiddleware',
63 'django.middleware.doc.XViewMiddleware',
17353922 64 'reversion.middleware.RevisionMiddleware',
5e23d90d
OL
65)
66
67ROOT_URLCONF = 'project.urls'
68
5e23d90d
OL
69INSTALLED_APPS = (
70 'auf.django.skin',
bf6f2712 71 'auf.django.references',
5e23d90d
OL
72 'admin_tools',
73 'admin_tools.theming',
74 'admin_tools.menu',
75 'admin_tools.dashboard',
76 'django.contrib.auth',
77 'django.contrib.contenttypes',
9cb4de55 78 'django.contrib.messages',
5e23d90d
OL
79 'django.contrib.sessions',
80 'django.contrib.admin',
63f8af95 81 'django.contrib.staticfiles',
a194e017 82 'django_qbe',
98bca02b 83 'auf.django.emploi',
fc18c1ca 84 'auf.django.admingroup',
3121c13c 85 'ajax_select',
5e23d90d 86 'south',
17353922 87 'reversion',
e6f52402 88 'auf.django.workflow',
c3f0b49f 89 'auf.django.permissions',
09aa8374 90 #'project.rh_v1',
6ad01c0a 91 'project.rh',
17353922 92 'project.dae',
ca1a7b76 93 'project.legacy',
7ffc5aa4 94 'alphafilter',
cf5662f1 95 'auf.django.emploi',
8ea41642 96 'project.recrutement',
97 'form_utils',
ec517164 98 'tinymce',
86caaf03 99 'captcha',
5e23d90d
OL
100)
101
102TEMPLATE_CONTEXT_PROCESSORS = (
4229d916 103 'django.contrib.auth.context_processors.auth',
5e23d90d
OL
104 'django.core.context_processors.debug',
105 'django.core.context_processors.i18n',
106 'django.core.context_processors.media',
63f8af95 107 'django.core.context_processors.static',
5e23d90d
OL
108 'django.contrib.messages.context_processors.messages',
109 'django.core.context_processors.request',
110 'auf.django.skin.context_processors.auf',
0f844142 111 'project.context_processors.this_employe',
e993f3dc 112 'project.context_processors.user_is_admin',
719b51ec 113 'dae.context_processors.user_in_dae_groupes',
114 'recrutement.context_processors.user_in_recrutement_groupes',
5e23d90d
OL
115)
116
8846b99e
OL
117AUTHENTICATION_BACKENDS = (
118 'auf.django.auth.backends.CascadeBackend',
c3f0b49f 119 'auf.django.permissions.backends.AuthenticationBackend',
8846b99e 120)
f8daa167 121LOGIN_URL = "/connexion"
5afb3da6 122LOGIN_REDIRECT_URL = "/"
5e23d90d 123
5e23d90d
OL
124TEMPLATE_DIRS = (
125 os.path.join(os.path.dirname(__file__), "templates"),
126)
127
128
8846b99e 129ADMIN_TOOLS_INDEX_DASHBOARD = 'project.dashboard.CustomIndexDashboard'
7f43054e 130ADMIN_TOOLS_APP_INDEX_DASHBOARD = 'project.dashboard.CustomAppIndexDashboard'
6f38ca31 131ADMIN_TOOLS_MENU = 'project.menu.CustomMenu'
3121c13c
OL
132
133AJAX_LOOKUP_CHANNELS = {
134 'responsables' : ('dae.catalogues', 'Responsable'),
03b395db 135 'dossiers' : ('dae.catalogues', 'Dossier'),
e503e64d 136 'dae_postes' : ('dae.catalogues', 'Poste'),
105dd778
OL
137 'pays' : ('rh.catalogues', 'Pays'),
138 'implantations' : ('rh.catalogues', 'Implantation'),
139 'typepostes' : ('rh.catalogues', 'TypePoste'),
140 'postes' : ('rh.catalogues', 'Poste'),
141 'valeurpoints' : ('rh.catalogues', 'ValeurPoint'),
0b0545bd
OL
142 'employes' : ('rh.catalogues', 'Employe'),
143 'dossiers' : ('rh.catalogues', 'Dossier'),
3121c13c 144}
105dd778
OL
145AJAX_SELECT_BOOTSTRAP = True
146AJAX_SELECT_INLINES = 'inline'
147
8ea41642 148
ec517164 149TINYMCE_DEFAULT_CONFIG = {
150'theme': "advanced",
151'plugins':"paste",
152'theme_advanced_buttons1' : "bold,italic,underline,|,formatselect,|,bullist,numlist,|,undo,redo,|,link,unlink",
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',
171}
34dad720 172
ca1a7b76
EMS
173DATABASE_ROUTERS = (
174 'project.legacy.DatabaseRouter',
175)
176
34dad720 177# django-sendfile
34dad720 178SENDFILE_BACKEND = 'sendfile.backends.simple'