dae+rh
[auf_rh_dae.git] / project / settings.py
1 # -*- encoding: utf-8 -*-
2
3 import os
4 import socket
5 from conf import *
6
7
8 PROJET_TITRE = "Ressources humaines"
9
10 # Rapports d'erreurs
11 EMAIL_SUBJECT_PREFIX = '[auf_rh_dae - %s] ' % socket.gethostname()
12 ADMINS = (
13 ('Équipe ARI-SI', 'developpeurs@ca.auf.org'),
14 )
15
16 MANAGERS = ADMINS
17
18 TIME_ZONE = 'Canada/Montreal'
19 DATE_FORMAT = 'j F Y'
20 LANGUAGE_CODE = 'fr-ca'
21
22 # Absolute path to the directory that holds media.
23 # Example: "/home/media/media.lawrence.com/"
24 MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'media')
25 PRIVE_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/"
30 MEDIA_URL = '/media/'
31 PRIVE_MEDIA_URL = '/dae/prive/'
32 OE_PRIVE_MEDIA_URL = '/recrutement/prive/'
33
34
35 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
36 # trailing slash.
37 # Examples: "http://foo.com/media/", "/media/".
38 ADMIN_MEDIA_PREFIX = '/media/django/'
39
40 # Don't share this with anybody.
41 SECRET_KEY = '^2w#%abp_d+e#(7f5w$leef50)c@4y38cnn#ccji@84$2^rt#l'
42
43 MIDDLEWARE_CLASSES = (
44 'django.middleware.common.CommonMiddleware',
45 'django.contrib.sessions.middleware.SessionMiddleware',
46 'django.contrib.messages.middleware.MessageMiddleware',
47 'django.contrib.auth.middleware.AuthenticationMiddleware',
48 'django.middleware.doc.XViewMiddleware',
49 'reversion.middleware.RevisionMiddleware',
50 )
51
52 ROOT_URLCONF = 'project.urls'
53
54 INSTALLED_APPS = (
55 'auf.django.skin',
56 'admin_tools',
57 'admin_tools.theming',
58 'admin_tools.menu',
59 'admin_tools.dashboard',
60 'django.contrib.auth',
61 'django.contrib.contenttypes',
62 'django.contrib.messages',
63 'django.contrib.sessions',
64 'django.contrib.admin',
65 'django_qbe',
66 'auf.django.emploi',
67 'auf.django.admingroup',
68 'ajax_select',
69 'south',
70 'reversion',
71 'project.rh',
72 'auf.django.workflow',
73 'auf.django.permissions',
74 'project.rh_v1',
75 'project.rh',
76 'project.dae',
77 'alphafilter',
78 'project.recrutement',
79 'form_utils',
80 'tinymce',
81 'captcha',
82 )
83
84 TEMPLATE_CONTEXT_PROCESSORS = (
85 'django.core.context_processors.auth',
86 'django.core.context_processors.debug',
87 'django.core.context_processors.i18n',
88 'django.core.context_processors.media',
89 'django.contrib.messages.context_processors.messages',
90 'django.core.context_processors.request',
91 'auf.django.skin.context_processors.auf',
92 #'project.context_processors.utilisateur',
93 'project.context_processors.this_employe',
94 'project.context_processors.user_is_admin',
95 'dae.context_processors.user_in_dae_groupes',
96 'recrutement.context_processors.user_in_recrutement_groupes',
97 )
98
99 AUTHENTICATION_BACKENDS = (
100 'auf.django.auth.backends.CascadeBackend',
101 'auf.django.permissions.backends.AuthenticationBackend',
102 )
103 LOGIN_URL = "/connexion"
104 LOGIN_REDIRECT_URL = "/"
105
106 TEMPLATE_LOADERS = (
107 'django.template.loaders.filesystem.load_template_source',
108 'django.template.loaders.app_directories.load_template_source',
109 )
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 }
125
126 TINYMCE_DEFAULT_CONFIG = {
127 'theme': "advanced",
128 'plugins':"paste",
129 'theme_advanced_buttons1' : "bold,italic,underline,|,formatselect,|,bullist,numlist,|,undo,redo,|,link,unlink",
130 'theme_advanced_buttons2' : "",
131 'theme_advanced_buttons3' : "",
132 'theme_advanced_statusbar_location' : "bottom",
133 'theme_advanced_toolbar_align' : "left",
134 'theme_advanced_styles' : "Titre=titre;Sous-titre=sous-titre;Normal=normal",
135 'width' : "800",
136 'height' : "200",
137 'theme_advanced_resizing' : "true",
138 'custom_undo_redo_levels': 10,
139 'theme_advanced_toolbar_location' : 'top',
140 'inline_styles' : 'false',
141 'paste_use_dialog' : 'false',
142 'paste_auto_cleanup_on_paste' : 'true',
143 'paste_convert_headers_to_strong' : 'false',
144 'paste_strip_class_attributes' : 'all',
145 'paste_remove_spans' : 'true',
146 'paste_remove_styles' : 'true',
147 'content_css' : '/media/css/tinymce.css',
148 }
149
150 # django-sendfile
151 SENDFILE_BACKEND = 'sendfile.backends.simple'