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