greffe recrutement en PROD
[auf_rh_dae.git] / project / settings.py
1 # -*- encoding: utf-8 -*-
2
3 import os
4 import socket
5 from conf import *
6
7 PROJET_TITRE = "Demande d'autorisation d'embauche"
8
9 # Rapports d'erreurs
10 EMAIL_SUBJECT_PREFIX = '[auf_rh_dae - %s] ' % socket.gethostname()
11 ADMINS = (
12 ('Équipe ARI-SI', 'developpeurs@ca.auf.org'),
13 )
14
15 MANAGERS = ADMINS
16
17 TIME_ZONE = 'America/Montreal'
18 DATE_FORMAT = 'd F Y'
19 LANGUAGE_CODE = 'fr-ca'
20
21 # Absolute path to the directory that holds media.
22 # Example: "/home/media/media.lawrence.com/"
23 MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'media')
24 PRIVE_MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'media_prive')
25
26 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
27 # trailing slash if there is a path component (optional in other cases).
28 # Examples: "http://media.lawrence.com", "http://example.com/media/"
29 MEDIA_URL = '/media/'
30 PRIVE_MEDIA_URL = '/dae/prive/'
31 OE_PRIVE_MEDIA_URL = '/recrutement/prive/'
32
33 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
34 # trailing slash.
35 # Examples: "http://foo.com/media/", "/media/".
36 ADMIN_MEDIA_PREFIX = '/media/django/'
37
38 # Don't share this with anybody.
39 SECRET_KEY = '^2w#%abp_d+e#(7f5w$leef50)c@4y38cnn#ccji@84$2^rt#l'
40
41 MIDDLEWARE_CLASSES = (
42 'django.middleware.common.CommonMiddleware',
43 'django.contrib.sessions.middleware.SessionMiddleware',
44 'django.contrib.messages.middleware.MessageMiddleware',
45 'django.contrib.auth.middleware.AuthenticationMiddleware',
46 'django.middleware.doc.XViewMiddleware',
47 'reversion.middleware.RevisionMiddleware',
48 )
49
50 ROOT_URLCONF = 'project.urls'
51
52
53 INSTALLED_APPS = (
54 'auf.django.skin',
55 'auf.django.references',
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 'auf.django.admingroup',
66 'ajax_select',
67 'south',
68 'reversion',
69 'auf.django.workflow',
70 'auf.django.permissions',
71 'project.rh_v1',
72 'project.dae',
73 'auf.django.emploi',
74 'project.recrutement',
75 'form_utils',
76 'captcha',
77 )
78
79 TEMPLATE_CONTEXT_PROCESSORS = (
80 'django.core.context_processors.auth',
81 'django.core.context_processors.debug',
82 'django.core.context_processors.i18n',
83 'django.core.context_processors.media',
84 'django.contrib.messages.context_processors.messages',
85 'django.core.context_processors.request',
86 'auf.django.skin.context_processors.auf',
87 'project.context_processors.utilisateur',
88 'project.context_processors.user_is_admin',
89 'recrutement.context_processors.user_in_recrutement_groupes',
90 )
91
92 AUTHENTICATION_BACKENDS = (
93 'auf.django.auth.backends.CascadeBackend',
94 'auf.django.permissions.backends.AuthenticationBackend',
95 )
96 LOGIN_URL = "/connexion"
97 LOGIN_REDIRECT_URL = "/"
98
99 TEMPLATE_LOADERS = (
100 'django.template.loaders.filesystem.load_template_source',
101 'django.template.loaders.app_directories.load_template_source',
102 )
103
104 TEMPLATE_DIRS = (
105 os.path.join(os.path.dirname(__file__), "templates"),
106 )
107
108
109 ADMIN_TOOLS_INDEX_DASHBOARD = 'project.dashboard.CustomIndexDashboard'
110
111 AJAX_LOOKUP_CHANNELS = {
112 'responsables' : ('dae.catalogues', 'Responsable'),
113 'dossiers' : ('dae.catalogues', 'Dossier'),
114 'postes' : ('dae.catalogues', 'Poste'),
115 }
116
117 # django-sendfile
118
119 SENDFILE_BACKEND = 'sendfile.backends.simple'
120