django-notifications/notifications/tests/settings_for_tests.py
2024-04-13 19:59:01 -03:00

64 lines
1.5 KiB
Python

import os
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
SECRET_KEY = "secret_key" # nosec
DEBUG = True
TESTING = True
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": "test.sqlite3",
}
}
MIDDLEWARE = (
"django.contrib.sessions.middleware.SessionMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
)
INSTALLED_APPS = [
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.messages",
"django.contrib.staticfiles",
"django.contrib.sessions",
"notifications",
]
ROOT_URLCONF = "notifications.tests.urls_for_tests"
STATIC_URL = "/static/"
STATICFILES_DIRS = [
os.path.join(BASE_DIR, "static"),
]
STATIC_ROOT = os.path.join(BASE_DIR, "static-files")
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [os.path.join(BASE_DIR, "templates")],
"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",
],
},
},
]
LOGIN_REDIRECT_URL = "test/"
LOGIN_URL = "/admin/login/"
APPEND_SLASH = True
DJANGO_NOTIFICATIONS_CONFIG = {
"USE_JSONFIELD": True,
}
USE_TZ = True
ALLOWED_HOSTS = ["*"]