django-oidc-provider/example_project/provider_app/settings.py

91 lines
2 KiB
Python
Raw Normal View History

2015-03-19 20:10:00 +00:00
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
2015-08-04 18:34:30 +00:00
SECRET_KEY = 'c14d549c574e4d8cf162404ef0b04598'
2015-03-19 20:10:00 +00:00
2015-08-04 20:56:03 +00:00
DEBUG = True
2015-03-19 20:10:00 +00:00
2015-08-04 18:34:30 +00:00
TEMPLATE_DEBUG = False
2015-03-19 20:10:00 +00:00
2015-08-04 18:34:30 +00:00
ALLOWED_HOSTS = ['*']
2015-03-19 20:10:00 +00:00
# Application definition
INSTALLED_APPS = [
2015-03-19 20:10:00 +00:00
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
2015-04-28 17:55:35 +00:00
'provider_app',
2015-03-19 20:10:00 +00:00
'oidc_provider',
]
2015-03-19 20:10:00 +00:00
MIDDLEWARE_CLASSES = [
2015-03-19 20:10:00 +00:00
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
2015-03-19 20:10:00 +00:00
ROOT_URLCONF = 'provider_app.urls'
WSGI_APPLICATION = 'provider_app.wsgi.application'
# Database
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
2015-08-04 18:34:30 +00:00
'NAME': os.path.join(BASE_DIR, 'DATABASE.sqlite3'),
2015-03-19 20:10:00 +00:00
}
}
# Internationalization
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
STATIC_URL = '/static/'
2015-08-04 18:34:30 +00:00
STATIC_ROOT = os.path.join(BASE_DIR, 'static/')
# Custom settings
2015-03-19 20:10:00 +00:00
2015-04-30 20:03:39 +00:00
LOGIN_REDIRECT_URL = '/'
2015-03-19 20:10:00 +00:00
2015-08-04 18:34:30 +00:00
# OIDC Provider settings
2015-03-19 20:10:00 +00:00
2015-07-14 16:27:46 +00:00
SITE_URL = 'http://localhost:8000'
OIDC_RSA_KEY_FOLDER = BASE_DIR