1
# django-openid-auth - OpenID integration for django.contrib.auth
3
# Copyright (C) 2007 Simon Willison
4
# Copyright (C) 2008-2009 Canonical Ltd.
6
# Redistribution and use in source and binary forms, with or without
7
# modification, are permitted provided that the following conditions
10
# * Redistributions of source code must retain the above copyright
11
# notice, this list of conditions and the following disclaimer.
13
# * Redistributions in binary form must reproduce the above copyright
14
# notice, this list of conditions and the following disclaimer in the
15
# documentation and/or other materials provided with the distribution.
17
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
20
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
21
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
22
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
23
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
27
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28
# POSSIBILITY OF SUCH DAMAGE.
30
# Django settings for example project.
33
TEMPLATE_DEBUG = DEBUG
36
# ('Your Name', 'your_email@domain.com'),
41
DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
42
DATABASE_NAME = 'sqlite.db' # Or path to database file if using sqlite3.
43
DATABASE_USER = '' # Not used with sqlite3.
44
DATABASE_PASSWORD = '' # Not used with sqlite3.
45
DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
46
DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
48
# Local time zone for this installation. Choices can be found here:
49
# http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
50
# although not all variations may be possible on all operating systems.
51
# If running in a Windows environment this must be set to the same as your
53
TIME_ZONE = 'America/Chicago'
55
# Language code for this installation. All choices can be found here:
56
# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
57
# http://blogs.law.harvard.edu/tech/stories/storyReader$15
58
LANGUAGE_CODE = 'en-us'
62
# If you set this to False, Django will make some optimizations so as not
63
# to load the internationalization machinery.
66
# Absolute path to the directory that holds media.
67
# Example: "/home/media/media.lawrence.com/"
70
# URL that handles the media served from MEDIA_ROOT.
71
# Example: "http://media.lawrence.com"
74
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
76
# Examples: "http://foo.com/media/", "/media/".
77
ADMIN_MEDIA_PREFIX = '/media/'
79
# Make this unique, and don't share it with anybody.
80
SECRET_KEY = '34958734985734985734985798437'
82
# List of callables that know how to import templates from various sources.
84
'django.template.loaders.filesystem.load_template_source',
85
'django.template.loaders.app_directories.load_template_source',
86
# 'django.template.loaders.eggs.load_template_source',
89
MIDDLEWARE_CLASSES = (
90
'django.middleware.common.CommonMiddleware',
91
'django.contrib.sessions.middleware.SessionMiddleware',
92
'django.contrib.auth.middleware.AuthenticationMiddleware',
95
ROOT_URLCONF = 'example_consumer.urls'
98
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
99
# Always use forward slashes, even on Windows.
100
# Don't forget to use absolute paths, not relative paths.
104
'django.contrib.auth',
105
'django.contrib.contenttypes',
106
'django.contrib.sessions',
107
'django.contrib.admin',
108
'django_openid_auth',
111
AUTHENTICATION_BACKENDS = (
112
'django_openid_auth.auth.OpenIDBackend',
113
'django.contrib.auth.backends.ModelBackend',
116
# Should users be created when new OpenIDs are used to log in?
117
OPENID_CREATE_USERS = True
119
# When logging in again, should we overwrite user details based on
120
# data received via Simple Registration?
121
OPENID_UPDATE_DETAILS_FROM_SREG = True
123
# If set, always use this as the identity URL rather than asking the
124
# user. This only makes sense if it is a server URL.
125
OPENID_SSO_SERVER_URL = 'https://login.launchpad.net/'
127
# Tell django.contrib.auth to use the OpenID signin URLs.
128
LOGIN_URL = '/openid/login/'
129
LOGIN_REDIRECT_URL = '/'
131
# Should django_auth_openid be used to sign into the admin interface?
132
OPENID_USE_AS_ADMIN_LOGIN = False