sécurité a priori : dae, recrutement (context_processor)
[auf_rh_dae.git] / project / settings.py
... / ...
CommitLineData
1# -*- encoding: utf-8 -*-
2
3import os
4import socket
5from conf import *
6
7
8PROJET_TITRE = "Ressources humaines"
9
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'
19DATE_FORMAT = 'd F Y'
20LANGUAGE_CODE = 'fr-ca'
21
22# Absolute path to the directory that holds media.
23# Example: "/home/media/media.lawrence.com/"
24MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'media')
25PRIVE_MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'media_prive')
26
27# URL that handles the media served from MEDIA_ROOT. Make sure to use a
28# trailing slash if there is a path component (optional in other cases).
29# Examples: "http://media.lawrence.com", "http://example.com/media/"
30MEDIA_URL = '/media/'
31PRIVE_MEDIA_URL = '/dae/prive/'
32
33
34# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
35# trailing slash.
36# Examples: "http://foo.com/media/", "/media/".
37ADMIN_MEDIA_PREFIX = '/media/django/'
38
39# Don't share this with anybody.
40SECRET_KEY = '^2w#%abp_d+e#(7f5w$leef50)c@4y38cnn#ccji@84$2^rt#l'
41
42MIDDLEWARE_CLASSES = (
43 'django.middleware.common.CommonMiddleware',
44 'django.contrib.sessions.middleware.SessionMiddleware',
45 'django.contrib.messages.middleware.MessageMiddleware',
46 'django.contrib.auth.middleware.AuthenticationMiddleware',
47 'django.middleware.doc.XViewMiddleware',
48 'reversion.middleware.RevisionMiddleware',
49)
50
51ROOT_URLCONF = 'project.urls'
52
53INSTALLED_APPS = (
54 'auf.django.skin',
55 'admin_tools',
56 'admin_tools.theming',
57 'admin_tools.menu',
58 'admin_tools.dashboard',
59 'django.contrib.auth',
60 'django.contrib.contenttypes',
61 'django.contrib.messages',
62 'django.contrib.sessions',
63 'django.contrib.admin',
64 'auf.django.admingroup',
65 'ajax_select',
66 'south',
67 'reversion',
68 'project.rh',
69 'auf.django.workflow',
70 'project.rh_v1',
71 'project.dae',
72 #'project.budget',
73 'alphafilter',
74 'project.recrutement',
75 'form_utils',
76 'tinymce',
77 'captcha',
78# 'private_files',
79)
80
81TEMPLATE_CONTEXT_PROCESSORS = (
82 'django.core.context_processors.auth',
83 'django.core.context_processors.debug',
84 'django.core.context_processors.i18n',
85 'django.core.context_processors.media',
86 'django.contrib.messages.context_processors.messages',
87 'django.core.context_processors.request',
88 'auf.django.skin.context_processors.auf',
89 'project.context_processors.utilisateur',
90 'project.context_processors.user_is_admin',
91 'dae.context_processors.user_in_dae_groupes',
92 'recrutement.context_processors.user_in_recrutement_groupes',
93)
94
95AUTHENTICATION_BACKENDS = (
96 'auf.django.auth.backends.CascadeBackend',
97)
98LOGIN_URL = "/connexion"
99LOGIN_REDIRECT_URL = "/"
100
101TEMPLATE_LOADERS = (
102 'django.template.loaders.filesystem.load_template_source',
103 'django.template.loaders.app_directories.load_template_source',
104)
105
106TEMPLATE_DIRS = (
107 os.path.join(os.path.dirname(__file__), "templates"),
108)
109
110
111ADMIN_TOOLS_INDEX_DASHBOARD = 'project.dashboard.CustomIndexDashboard'
112
113AJAX_LOOKUP_CHANNELS = {
114 'responsables' : ('dae.catalogues', 'Responsable'),
115 'dossiers' : ('dae.catalogues', 'Dossier'),
116 'postes' : ('dae.catalogues', 'Poste'),
117}
118
119TINYMCE_DEFAULT_CONFIG = {
120'theme': "advanced",
121'plugins':"paste",
122'theme_advanced_buttons1' : "bold,italic,underline,|,formatselect,|,bullist,numlist,|,undo,redo,|,link,unlink",
123'theme_advanced_buttons2' : "",
124'theme_advanced_buttons3' : "",
125'theme_advanced_statusbar_location' : "bottom",
126'theme_advanced_toolbar_align' : "left",
127'theme_advanced_styles' : "Titre=titre;Sous-titre=sous-titre;Normal=normal",
128'width' : "800",
129'height' : "200",
130'theme_advanced_resizing' : "true",
131'custom_undo_redo_levels': 10,
132'theme_advanced_toolbar_location' : 'top',
133'inline_styles' : 'false',
134'paste_use_dialog' : 'false',
135'paste_auto_cleanup_on_paste' : 'true',
136'paste_convert_headers_to_strong' : 'false',
137'paste_strip_class_attributes' : 'all',
138'paste_remove_spans' : 'true',
139'paste_remove_styles' : 'true',
140'content_css' : '/media/css/tinymce.css',
141}
142
143EMAIL_HOST = 'localhost'
144EMAIL_PORT = '1025'
145
146#FILE_PROTECTION_METHOD = 'basic'