mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-24 02:24:07 +03:00
1469739109
These settings should not be required since Django never connects to an external component when sending email. Instead it's stored in memory. https://docs.djangoproject.com/en/2.2/topics/email/#in-memory-backend
54 lines
1.7 KiB
Python
54 lines
1.7 KiB
Python
"""
|
|
With these settings, tests run faster.
|
|
"""
|
|
|
|
from .base import * # noqa
|
|
from .base import env
|
|
|
|
# GENERAL
|
|
# ------------------------------------------------------------------------------
|
|
# https://docs.djangoproject.com/en/dev/ref/settings/#debug
|
|
DEBUG = False
|
|
# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
|
|
SECRET_KEY = env(
|
|
"DJANGO_SECRET_KEY",
|
|
default="!!!SET DJANGO_SECRET_KEY!!!",
|
|
)
|
|
# https://docs.djangoproject.com/en/dev/ref/settings/#test-runner
|
|
TEST_RUNNER = "django.test.runner.DiscoverRunner"
|
|
|
|
# CACHES
|
|
# ------------------------------------------------------------------------------
|
|
# https://docs.djangoproject.com/en/dev/ref/settings/#caches
|
|
CACHES = {
|
|
"default": {
|
|
"BACKEND": "django.core.cache.backends.locmem.LocMemCache",
|
|
"LOCATION": "",
|
|
}
|
|
}
|
|
|
|
# PASSWORDS
|
|
# ------------------------------------------------------------------------------
|
|
# https://docs.djangoproject.com/en/dev/ref/settings/#password-hashers
|
|
PASSWORD_HASHERS = ["django.contrib.auth.hashers.MD5PasswordHasher"]
|
|
|
|
# TEMPLATES
|
|
# ------------------------------------------------------------------------------
|
|
TEMPLATES[0]["OPTIONS"]["loaders"] = [ # noqa F405
|
|
(
|
|
"django.template.loaders.cached.Loader",
|
|
[
|
|
"django.template.loaders.filesystem.Loader",
|
|
"django.template.loaders.app_directories.Loader",
|
|
],
|
|
)
|
|
]
|
|
|
|
# EMAIL
|
|
# ------------------------------------------------------------------------------
|
|
# https://docs.djangoproject.com/en/dev/ref/settings/#email-backend
|
|
EMAIL_BACKEND = "django.core.mail.backends.locmem.EmailBackend"
|
|
|
|
# Your stuff...
|
|
# ------------------------------------------------------------------------------
|