fix timezone +datamaster upgrade + django 1.3
[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 = '/dae/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 'admin_tools',
63 'admin_tools.theming',
64 'admin_tools.menu',
65 'admin_tools.dashboard',
66 'django.contrib.auth',
67 'django.contrib.contenttypes',
68 'django.contrib.messages',
69 'django.contrib.sessions',
70 'django.contrib.admin',
71 'django_qbe',
72 'auf.django.emploi',
73 'auf.django.admingroup',
74 'ajax_select',
75 'south',
76 'reversion',
77 'project.rh',
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.utilisateur',
99 'project.context_processors.this_employe',
100 'project.context_processors.user_is_admin',
101 'dae.context_processors.user_in_dae_groupes',
102 'recrutement.context_processors.user_in_recrutement_groupes',
103 )
104
105 AUTHENTICATION_BACKENDS = (
106 'auf.django.auth.backends.CascadeBackend',
107 'auf.django.permissions.backends.AuthenticationBackend',
108 )
109 LOGIN_URL = "/connexion"
110 LOGIN_REDIRECT_URL = "/"
111
112 TEMPLATE_LOADERS = (
113 'django.template.loaders.filesystem.load_template_source',
114 'django.template.loaders.app_directories.load_template_source',
115 )
116
117 TEMPLATE_DIRS = (
118 os.path.join(os.path.dirname(__file__), "templates"),
119 )
120
121
122 ADMIN_TOOLS_INDEX_DASHBOARD = 'project.dashboard.CustomIndexDashboard'
123 ADMIN_TOOLS_APP_INDEX_DASHBOARD = 'project.dashboard.CustomAppIndexDashboard'
124 ADMIN_TOOLS_MENU = 'project.menu.CustomMenu'
125
126 AJAX_LOOKUP_CHANNELS = {
127 'responsables' : ('dae.catalogues', 'Responsable'),
128 'dossiers' : ('dae.catalogues', 'Dossier'),
129 'postes' : ('dae.catalogues', 'Poste'),
130 }
131
132 TINYMCE_DEFAULT_CONFIG = {
133 'theme': "advanced",
134 'plugins':"paste",
135 'theme_advanced_buttons1' : "bold,italic,underline,|,formatselect,|,bullist,numlist,|,undo,redo,|,link,unlink",
136 'theme_advanced_buttons2' : "",
137 'theme_advanced_buttons3' : "",
138 'theme_advanced_statusbar_location' : "bottom",
139 'theme_advanced_toolbar_align' : "left",
140 'theme_advanced_styles' : "Titre=titre;Sous-titre=sous-titre;Normal=normal",
141 'width' : "800",
142 'height' : "200",
143 'theme_advanced_resizing' : "true",
144 'custom_undo_redo_levels': 10,
145 'theme_advanced_toolbar_location' : 'top',
146 'inline_styles' : 'false',
147 'paste_use_dialog' : 'false',
148 'paste_auto_cleanup_on_paste' : 'true',
149 'paste_convert_headers_to_strong' : 'false',
150 'paste_strip_class_attributes' : 'all',
151 'paste_remove_spans' : 'true',
152 'paste_remove_styles' : 'true',
153 'content_css' : '/media/css/tinymce.css',
154 }
155
156 # django-sendfile
157 SENDFILE_BACKEND = 'sendfile.backends.simple'