53 lines
1.5 KiB
Python
53 lines
1.5 KiB
Python
from django.urls import reverse_lazy # noqa
|
|
|
|
# Minimal settings to run a django app using authens.
|
|
|
|
|
|
SECRET_KEY = "dummy"
|
|
|
|
INSTALLED_APPS = [
|
|
"django.contrib.contenttypes",
|
|
"django.contrib.auth",
|
|
"django.contrib.sessions",
|
|
"authens",
|
|
"tests",
|
|
]
|
|
|
|
AUTHENTICATION_BACKENDS = [
|
|
"django.contrib.auth.backends.ModelBackend",
|
|
"authens.backends.ENSCASBackend",
|
|
"authens.backends.OldCASBackend",
|
|
]
|
|
|
|
MIDDLEWARE = [
|
|
"django.middleware.security.SecurityMiddleware",
|
|
"django.contrib.sessions.middleware.SessionMiddleware",
|
|
"django.middleware.common.CommonMiddleware",
|
|
"django.middleware.csrf.CsrfViewMiddleware",
|
|
"django.contrib.auth.middleware.AuthenticationMiddleware",
|
|
"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",
|
|
],
|
|
},
|
|
},
|
|
]
|
|
|
|
DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3"}}
|
|
|
|
ROOT_URLCONF = "tests.urls"
|
|
LOGIN_URL = reverse_lazy("authens:login")
|
|
LOGIN_REDIRECT_URL = "/private"
|
|
LOGOUT_REDIRECT_URL = "/public"
|