mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-12-03 06:54:06 +03:00
87a8acbae2
> 'debug': a boolean that turns on/off template debug mode. If it is > True, the fancy error page will display a detailed report for any > exception raised during template rendering. This report contains the > relevant snippet of the template with the appropriate line highlighted. > It defaults to the value of the DEBUG setting. https://docs.djangoproject.com/en/2.2/topics/templates/#module-django.template.backends.django I could be wrong about this, but it seems like setting the template DEBUG setting is redundant, since it should follow whatever the DEBUG variable is set to.
58 lines
1.8 KiB
Python
58 lines
1.8 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"
|
|
# https://docs.djangoproject.com/en/dev/ref/settings/#email-host
|
|
EMAIL_HOST = "localhost"
|
|
# https://docs.djangoproject.com/en/dev/ref/settings/#email-port
|
|
EMAIL_PORT = 1025
|
|
|
|
# Your stuff...
|
|
# ------------------------------------------------------------------------------
|