forked from adamcharnock/django-su
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_settings.py
executable file
·44 lines (33 loc) · 943 Bytes
/
test_settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import os
DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:"}}
TEMPLATE_DIRS = [
os.path.join(os.path.dirname(os.path.realpath(__file__)), "test_templates"),
]
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": TEMPLATE_DIRS,
"APP_DIRS": True,
},
]
INSTALLED_APPS = [
"django.contrib.auth",
"django.contrib.sites",
"django.contrib.sessions",
"django.contrib.staticfiles",
"django.contrib.contenttypes",
"django_su",
"django.contrib.admin",
]
MIDDLEWARE_CLASSES = [
"django.contrib.sessions.middleware.SessionMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
]
MIDDLEWARE = MIDDLEWARE_CLASSES
ROOT_URLCONF = "test_urls"
SITE_ID = 1
STATIC_URL = "/static/"
AUTHENTICATION_BACKENDS = [
"django.contrib.auth.backends.ModelBackend",
"django_su.backends.SuBackend",
]