Première version : mise en route du suivi.
[auf_roa_authentification_backend.git] / exemple-client / settings.py
CommitLineData
cc755b15
CR
1# Django settings for exemple_client project.
2import os
3from conf import DEBUG, TEMPLATE_DEBUG, AUTH_PASSWORD_REQUIRED, \
4 DATABASE_ENGINE, DATABASE_NAME, DATABASE_USER, DATABASE_PASSWORD, \
5 DATABASE_HOST, DATABASE_PORT
6
7if DEBUG:
8 import sys
9 sys.path.append ("../../")
10
11ADMINS = (
12 # ('Your Name', 'your_email@domain.com'),
13)
14
15MANAGERS = ADMINS
16
17# Local time zone for this installation. Choices can be found here:
18# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
19# although not all choices may be available on all operating systems.
20# If running in a Windows environment this must be set to the same as your
21# system time zone.
22TIME_ZONE = 'America/Montreal'
23
24# Language code for this installation. All choices can be found here:
25# http://www.i18nguy.com/unicode/language-identifiers.html
26LANGUAGE_CODE = 'en-us'
27
28SITE_ID = 1
29
30# If you set this to False, Django will make some optimizations so as not
31# to load the internationalization machinery.
32USE_I18N = True
33
34# Absolute path to the directory that holds media.
35# Example: "/home/media/media.lawrence.com/"
36MEDIA_ROOT = ''
37
38# URL that handles the media served from MEDIA_ROOT. Make sure to use a
39# trailing slash if there is a path component (optional in other cases).
40# Examples: "http://media.lawrence.com", "http://example.com/media/"
41MEDIA_URL = ''
42
43# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
44# trailing slash.
45# Examples: "http://foo.com/media/", "/media/".
46ADMIN_MEDIA_PREFIX = '/media/'
47
48# Make this unique, and don't share it with anybody.
49SECRET_KEY = 'm1$u@d+jhgt#n=8t0z))=xg=92q(p+km8#16km)lx_b6^l+vt8'
50
51# List of callables that know how to import templates from various sources.
52TEMPLATE_LOADERS = (
53 'django.template.loaders.filesystem.load_template_source',
54 'django.template.loaders.app_directories.load_template_source',
55# 'django.template.loaders.eggs.load_template_source',
56)
57
58MIDDLEWARE_CLASSES = (
59 'django.middleware.common.CommonMiddleware',
60 'django.contrib.sessions.middleware.SessionMiddleware',
61 'django.contrib.auth.middleware.AuthenticationMiddleware',
62)
63
64ROOT_URLCONF = 'urls'
65
66TEMPLATE_DIRS = (
67 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
68 # Always use forward slashes, even on Windows.
69 # Don't forget to use absolute paths, not relative paths.
70 os.path.join(os.path.dirname(__file__), 'templates').replace('\\', '/'),
71)
72
73INSTALLED_APPS = (
74 'django.contrib.auth',
75 'django.contrib.contenttypes',
76 'django.contrib.sessions',
77 'django.contrib.sites',
78 'django_roa',
79 'django_roa.remoteauth',
80 'client',
81 'auf_roa_authentification_backend',
82)
83
84###################3
85# Important!
86
87AUTHENTICATION_BACKENDS = (
88 'auf_roa_authentification_backend.backends.CascadeBackend',
89)
90ROA_MODELS = True # set to False if you'd like to develop/test locally
91ROA_FORMAT = 'django'
92ROA_HEADERS = {
93 'Content-Type': 'application/x-www-form-urlencoded',
94}
95ROA_DJANGO_ERRORS = True # useful to ease debugging if you use test server
96
97ROA_MODEL_NAME_MAPPING = (
98 ('remoteauth.', 'auth.'),
99)
100ROA_BASE_URL = 'http://localhost:8003/auth/'
101SERIALIZATION_MODULES = {
102 'django' : 'auf_roa_authentification_backend.serializers',
103}
104