poste dae -> poste 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 = 'America/Montreal'
19 DATE_FORMAT = 'd-m-Y'
20 DATE_INPUT_FORMATS = (
21 '%d-%m-%Y', '%d/%m/%Y', '%d %m %Y',
22 '%d-%m-%y', '%d/%m/%y', '%d %m %y',
23 )
24
25 SHORT_DATE_FORMAT = 'd-m-Y'
26 LANGUAGE_CODE = 'fr-ca'
27
28 # Absolute path to the directory that holds media.
29 # Example: "/home/media/media.lawrence.com/"
30 MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'media')
31 PRIVE_MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'media_prive')
32
33 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
34 # trailing slash if there is a path component (optional in other cases).
35 # Examples: "http://media.lawrence.com", "http://example.com/media/"
36 MEDIA_URL = '/media/'
37 PRIVE_MEDIA_URL = '/rh/prive/'
38 OE_PRIVE_MEDIA_URL = '/recrutement/prive/'
39
40
41 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
42 # trailing slash.
43 # Examples: "http://foo.com/media/", "/media/".
44 ADMIN_MEDIA_PREFIX = '/media/django/'
45
46 # Don't share this with anybody.
47 SECRET_KEY = '^2w#%abp_d+e#(7f5w$leef50)c@4y38cnn#ccji@84$2^rt#l'
48
49 MIDDLEWARE_CLASSES = (
50 'django.middleware.common.CommonMiddleware',
51 'django.contrib.sessions.middleware.SessionMiddleware',
52 'django.contrib.messages.middleware.MessageMiddleware',
53 'django.contrib.auth.middleware.AuthenticationMiddleware',
54 'django.middleware.doc.XViewMiddleware',
55 'reversion.middleware.RevisionMiddleware',
56 )
57
58 ROOT_URLCONF = 'project.urls'
59
60 INSTALLED_APPS = (
61 'auf.django.skin',
62 'auf.django.references',
63 'admin_tools',
64 'admin_tools.theming',
65 'admin_tools.menu',
66 'admin_tools.dashboard',
67 'django.contrib.auth',
68 'django.contrib.contenttypes',
69 'django.contrib.messages',
70 'django.contrib.sessions',
71 'django.contrib.admin',
72 'django_qbe',
73 'auf.django.emploi',
74 'auf.django.admingroup',
75 'ajax_select',
76 'south',
77 'reversion',
78 'auf.django.workflow',
79 'auf.django.permissions',
80 #'project.rh_v1',
81 'project.rh',
82 'project.dae',
83 'alphafilter',
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 }
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'