merge dev
[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 = 'd 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
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/".
37 ADMIN_MEDIA_PREFIX = '/media/django/'
38
39 # Don't share this with anybody.
40 SECRET_KEY = '^2w#%abp_d+e#(7f5w$leef50)c@4y38cnn#ccji@84$2^rt#l'
41
42 MIDDLEWARE_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
51 ROOT_URLCONF = 'project.urls'
52
53 INSTALLED_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 'django_qbe',
65 'auf.django.emploi',
66 'auf.django.admingroup',
67 'ajax_select',
68 'south',
69 'reversion',
70 'project.rh',
71 'auf.django.workflow',
72 'project.rh_v1',
73 'project.dae',
74 #'project.budget',
75 'alphafilter',
76 'project.recrutement',
77 'form_utils',
78 'tinymce',
79 'captcha',
80 # 'private_files',
81 )
82
83 TEMPLATE_CONTEXT_PROCESSORS = (
84 'django.core.context_processors.auth',
85 'django.core.context_processors.debug',
86 'django.core.context_processors.i18n',
87 'django.core.context_processors.media',
88 'django.contrib.messages.context_processors.messages',
89 'django.core.context_processors.request',
90 'auf.django.skin.context_processors.auf',
91 #'project.context_processors.utilisateur',
92 'project.context_processors.this_employe',
93 'project.context_processors.user_is_admin',
94 'dae.context_processors.user_in_dae_groupes',
95 'recrutement.context_processors.user_in_recrutement_groupes',
96 )
97
98 AUTHENTICATION_BACKENDS = (
99 'auf.django.auth.backends.CascadeBackend',
100 )
101 LOGIN_URL = "/connexion"
102 LOGIN_REDIRECT_URL = "/"
103
104 TEMPLATE_LOADERS = (
105 'django.template.loaders.filesystem.load_template_source',
106 'django.template.loaders.app_directories.load_template_source',
107 )
108
109 TEMPLATE_DIRS = (
110 os.path.join(os.path.dirname(__file__), "templates"),
111 )
112
113
114 ADMIN_TOOLS_INDEX_DASHBOARD = 'project.dashboard.CustomIndexDashboard'
115
116 AJAX_LOOKUP_CHANNELS = {
117 'responsables' : ('dae.catalogues', 'Responsable'),
118 'dossiers' : ('dae.catalogues', 'Dossier'),
119 'postes' : ('dae.catalogues', 'Poste'),
120 }
121
122 TINYMCE_DEFAULT_CONFIG = {
123 'theme': "advanced",
124 'plugins':"paste",
125 'theme_advanced_buttons1' : "bold,italic,underline,|,formatselect,|,bullist,numlist,|,undo,redo,|,link,unlink",
126 'theme_advanced_buttons2' : "",
127 'theme_advanced_buttons3' : "",
128 'theme_advanced_statusbar_location' : "bottom",
129 'theme_advanced_toolbar_align' : "left",
130 'theme_advanced_styles' : "Titre=titre;Sous-titre=sous-titre;Normal=normal",
131 'width' : "800",
132 'height' : "200",
133 'theme_advanced_resizing' : "true",
134 'custom_undo_redo_levels': 10,
135 'theme_advanced_toolbar_location' : 'top',
136 'inline_styles' : 'false',
137 'paste_use_dialog' : 'false',
138 'paste_auto_cleanup_on_paste' : 'true',
139 'paste_convert_headers_to_strong' : 'false',
140 'paste_strip_class_attributes' : 'all',
141 'paste_remove_spans' : 'true',
142 'paste_remove_styles' : 'true',
143 'content_css' : '/media/css/tinymce.css',
144 }
145
146 EMAIL_HOST = 'localhost'
147 EMAIL_PORT = '1025'
148
149 #FILE_PROTECTION_METHOD = 'basic'