1
Fork 0
This repository has been archived on 2024-07-16. You can view files and clone it, but cannot push or open issues or pull requests.
wagtail-draftail-snippet/tests/test_settings.py

76 lines
2.2 KiB
Python
Raw Permalink Normal View History

2020-02-13 12:23:35 +00:00
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
2020-02-15 03:23:14 +00:00
ADMINS = (("test@example.com", "TEST-R"),)
2020-02-13 12:23:35 +00:00
2020-02-15 03:23:14 +00:00
DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": "tests.db"}}
2020-02-13 12:23:35 +00:00
2020-02-15 03:23:14 +00:00
SECRET_KEY = "_uobce43e5osp8xgsffssffsds2_16%y$sf*5(12vfg25hpnxik_*"
2020-02-13 12:23:35 +00:00
INSTALLED_APPS = [
2020-02-15 03:23:14 +00:00
"wagtail.contrib.forms",
"wagtail.contrib.redirects",
"wagtail.embeds",
"wagtail.sites",
"wagtail.users",
"wagtail.snippets",
"wagtail.documents",
"wagtail.images",
"wagtail.search",
"wagtail.admin",
"wagtail.core",
"modelcluster",
"taggit",
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.messages",
"django.contrib.sessions",
"django.contrib.sites",
"django.contrib.staticfiles",
2020-02-13 12:23:35 +00:00
# App Under test
2020-02-15 03:23:14 +00:00
"wagtail_draftail_snippet",
2020-02-13 12:23:35 +00:00
# Test app
2020-02-15 03:23:14 +00:00
"tests.testapp",
2020-02-13 12:23:35 +00:00
]
MIDDLEWARE = (
2020-02-15 03:23:14 +00:00
"django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.locale.LocaleMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"wagtail.core.middleware.SiteMiddleware",
"wagtail.contrib.redirects.middleware.RedirectMiddleware",
2020-02-13 12:23:35 +00:00
)
TEMPLATES = [
{
2020-02-15 03:23:14 +00:00
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [os.path.join(BASE_DIR, "templates")],
"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",
],
"loaders": [
"django.template.loaders.filesystem.Loader",
"django.template.loaders.app_directories.Loader",
2020-02-13 12:23:35 +00:00
],
},
2020-02-15 03:23:14 +00:00
}
2020-02-13 12:23:35 +00:00
]
DEBUG = True
TEMPLATE_DEBUG = DEBUG
2020-02-15 03:23:14 +00:00
ROOT_URLCONF = "tests.urls"
2020-02-13 12:23:35 +00:00
2020-02-15 03:23:14 +00:00
WAGTAIL_SITE_NAME = ("Test Site",)
2020-02-13 12:23:35 +00:00
SITE_ID = 1