boostup
[auf_rh_dae.git] / project / settings.py
1 # -*- encoding: utf-8 -*-
2
3 import os
4 import socket
5 from conf import *
6 PROJET_TITRE = "Ressources humaines"
7
8 # Rapports d'erreurs
9 EMAIL_SUBJECT_PREFIX = '[auf_rh_dae - %s] ' % socket.gethostname()
10 ADMINS = (
11 ('Équipe ARI-SI', 'developpeurs@ca.auf.org'),
12 )
13
14 MANAGERS = ADMINS
15
16 TIME_ZONE = 'America/Montreal'
17 DATE_FORMAT = 'd-m-Y'
18 DATE_INPUT_FORMATS = (
19 '%d-%m-%Y', '%d/%m/%Y', '%d %m %Y',
20 '%d-%m-%y', '%d/%m/%y', '%d %m %y',
21 )
22
23 SHORT_DATE_FORMAT = 'd-m-Y'
24 LANGUAGE_CODE = 'fr-ca'
25
26 # Absolute path to the directory that holds media.
27 # Example: "/home/media/media.lawrence.com/"
28 MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'media')
29 PRIVE_MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'media_prive')
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/"
34 MEDIA_URL = '/media/'
35 PRIVE_MEDIA_URL = '/rh/prive/'
36 OE_PRIVE_MEDIA_URL = '/recrutement/prive/'
37
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/".
42 ADMIN_MEDIA_PREFIX = '/media/django/'
43
44 # Don't share this with anybody.
45 SECRET_KEY = '^2w#%abp_d+e#(7f5w$leef50)c@4y38cnn#ccji@84$2^rt#l'
46
47 MIDDLEWARE_CLASSES = (
48 'django.middleware.common.CommonMiddleware',
49 'django.contrib.sessions.middleware.SessionMiddleware',
50 'django.contrib.messages.middleware.MessageMiddleware',
51 'django.contrib.auth.middleware.AuthenticationMiddleware',
52 'django.middleware.doc.XViewMiddleware',
53 'reversion.middleware.RevisionMiddleware',
54 )
55
56 ROOT_URLCONF = 'project.urls'
57
58 INSTALLED_APPS = (
59 'auf.django.skin',
60 'auf.django.references',
61 'admin_tools',
62 'admin_tools.theming',
63 'admin_tools.menu',
64 'admin_tools.dashboard',
65 'django.contrib.auth',
66 'django.contrib.contenttypes',
67 'django.contrib.messages',
68 'django.contrib.sessions',
69 'django.contrib.admin',
70 'django_qbe',
71 'auf.django.emploi',
72 'auf.django.admingroup',
73 'ajax_select',
74 'south',
75 'reversion',
76 'auf.django.workflow',
77 'auf.django.permissions',
78 #'project.rh_v1',
79 'project.rh',
80 'project.dae',
81 'project.legacy',
82 'alphafilter',
83 'auf.django.emploi',
84 'project.recrutement',
85 'form_utils',
86 'tinymce',
87 'captcha',
88 )
89
90 TEMPLATE_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',
98 'project.context_processors.this_employe',
99 'project.context_processors.user_is_admin',
100 'dae.context_processors.user_in_dae_groupes',
101 'recrutement.context_processors.user_in_recrutement_groupes',
102 )
103
104 AUTHENTICATION_BACKENDS = (
105 'auf.django.auth.backends.CascadeBackend',
106 'auf.django.permissions.backends.AuthenticationBackend',
107 )
108 LOGIN_URL = "/connexion"
109 LOGIN_REDIRECT_URL = "/"
110
111 TEMPLATE_DIRS = (
112 os.path.join(os.path.dirname(__file__), "templates"),
113 )
114
115
116 ADMIN_TOOLS_INDEX_DASHBOARD = 'project.dashboard.CustomIndexDashboard'
117 ADMIN_TOOLS_APP_INDEX_DASHBOARD = 'project.dashboard.CustomAppIndexDashboard'
118 ADMIN_TOOLS_MENU = 'project.menu.CustomMenu'
119
120 AJAX_LOOKUP_CHANNELS = {
121 'responsables' : ('dae.catalogues', 'Responsable'),
122 'dossiers' : ('dae.catalogues', 'Dossier'),
123 'postes' : ('dae.catalogues', 'Poste'),
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'),
129 'employes' : ('rh.catalogues', 'Employe'),
130 'dossiers' : ('rh.catalogues', 'Dossier'),
131 }
132 AJAX_SELECT_BOOTSTRAP = True
133 AJAX_SELECT_INLINES = 'inline'
134
135
136 TINYMCE_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 }
159
160 DATABASE_ROUTERS = (
161 'project.legacy.DatabaseRouter',
162 )
163
164 # django-sendfile
165 SENDFILE_BACKEND = 'sendfile.backends.simple'