~guitarmanvt/django-saml2-idp/tags

« back to all changes in this revision

Viewing changes to demo2/idptest/settings.py

  • Committer: john at andersoninnovative
  • Date: 2012-05-12 01:20:30 UTC
  • Revision ID: svn-v4:41e50629-eb6e-b841-421f-ad03d4eac035:tags:140
Added demo processor to work out-of-the-box with the django-saml2-sp demo project.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Django settings for idptest project.
 
2
 
 
3
DEBUG = True
 
4
TEMPLATE_DEBUG = DEBUG
 
5
 
 
6
ADMINS = (
 
7
    # ('Your Name', 'your_email@domain.com'),
 
8
)
 
9
 
 
10
MANAGERS = ADMINS
 
11
 
 
12
import os
 
13
PROJECT_ROOT = os.getcwd()
 
14
 
 
15
DATABASES = {
 
16
    'default': {
 
17
        'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
 
18
        'NAME': '%s/idptest.sqlite' % PROJECT_ROOT,                      # Or path to database file if using sqlite3.
 
19
        'USER': '',                      # Not used with sqlite3.
 
20
        'PASSWORD': '',                  # Not used with sqlite3.
 
21
        'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
 
22
        'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
 
23
    }
 
24
}
 
25
 
 
26
# Backwards-compatibility for Django 1.1:
 
27
DATABASE_ENGINE = 'sqlite3'
 
28
DATABASE_NAME = DATABASES['default']['NAME']
 
29
 
 
30
# Local time zone for this installation. Choices can be found here:
 
31
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
 
32
# although not all choices may be available on all operating systems.
 
33
# On Unix systems, a value of None will cause Django to use the same
 
34
# timezone as the operating system.
 
35
# If running in a Windows environment this must be set to the same as your
 
36
# system time zone.
 
37
TIME_ZONE = 'America/Chicago'
 
38
 
 
39
# Language code for this installation. All choices can be found here:
 
40
# http://www.i18nguy.com/unicode/language-identifiers.html
 
41
LANGUAGE_CODE = 'en-us'
 
42
 
 
43
SITE_ID = 1
 
44
 
 
45
# If you set this to False, Django will make some optimizations so as not
 
46
# to load the internationalization machinery.
 
47
USE_I18N = True
 
48
 
 
49
# If you set this to False, Django will not format dates, numbers and
 
50
# calendars according to the current locale
 
51
USE_L10N = True
 
52
 
 
53
# Absolute path to the directory that holds media.
 
54
# Example: "/home/media/media.lawrence.com/"
 
55
MEDIA_ROOT = ''
 
56
 
 
57
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
 
58
# trailing slash if there is a path component (optional in other cases).
 
59
# Examples: "http://media.lawrence.com", "http://example.com/media/"
 
60
MEDIA_URL = ''
 
61
 
 
62
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
 
63
# trailing slash.
 
64
# Examples: "http://foo.com/media/", "/media/".
 
65
ADMIN_MEDIA_PREFIX = '/media/'
 
66
 
 
67
# Make this unique, and don't share it with anybody.
 
68
SECRET_KEY = 'q+0vb%)c7c%&kl&jcca^6n7$3q4ktle9i28t(fd&qh28%l-%58'
 
69
 
 
70
# List of callables that know how to import templates from various sources.
 
71
TEMPLATE_LOADERS = (
 
72
    'django.template.loaders.filesystem.Loader',
 
73
    'django.template.loaders.app_directories.Loader',
 
74
#     'django.template.loaders.eggs.Loader',
 
75
)
 
76
 
 
77
MIDDLEWARE_CLASSES = (
 
78
    'django.middleware.common.CommonMiddleware',
 
79
    'django.contrib.sessions.middleware.SessionMiddleware',
 
80
    'django.middleware.csrf.CsrfViewMiddleware',
 
81
    'django.contrib.auth.middleware.AuthenticationMiddleware',
 
82
)
 
83
 
 
84
ROOT_URLCONF = 'idptest.urls'
 
85
 
 
86
TEMPLATE_DIRS = (
 
87
    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
 
88
    # Always use forward slashes, even on Windows.
 
89
    # Don't forget to use absolute paths, not relative paths.
 
90
    '%s/templates' % PROJECT_ROOT,
 
91
)
 
92
 
 
93
INSTALLED_APPS = (
 
94
    'django.contrib.admin',
 
95
    'django.contrib.auth',
 
96
    'django.contrib.contenttypes',
 
97
    'django.contrib.sessions',
 
98
    'django.contrib.sites',
 
99
    'saml2idp',
 
100
)
 
101
 
 
102
LOGIN_REDIRECT_URL = '/idp/sso/post/response/preview/'
 
103
SAML2IDP_SIGNING = True
 
104
SAML2IDP_PRIVATE_KEY_FILE = PROJECT_ROOT + '/keys/sample/sample-private-key.pem'
 
105
SAML2IDP_CERTIFICATE_FILE = PROJECT_ROOT + '/keys/sample/sample-certificate.pem'
 
106
 
 
107
# Setup logging.
 
108
import logging
 
109
logging.basicConfig(filename=PROJECT_ROOT + '/saml2idp.log', format='%(asctime)s: %(message)s', level=logging.DEBUG)
 
110
logging.info('Logging setup.')