-
Notifications
You must be signed in to change notification settings - Fork 340
/
settings_base.py
42 lines (33 loc) · 1011 Bytes
/
settings_base.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
import os
import django
ROOT_URLCONF = "pytest_django_test.urls"
INSTALLED_APPS = [
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.sites",
"pytest_django_test.app",
]
STATIC_URL = "/static/"
SECRET_KEY = "foobar"
# Used to construct unique test database names to allow detox to run multiple
# versions at the same time
db_suffix = "_%s" % os.getuid()
raise Exception("db_suffix: {}".format(db_suffix))
MIDDLEWARE = [
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
]
if django.VERSION < (1, 10):
MIDDLEWARE_CLASSES = MIDDLEWARE
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [],
"APP_DIRS": True,
"OPTIONS": {},
}
]