-
-
Notifications
You must be signed in to change notification settings - Fork 115
/
Copy pathdev.py
43 lines (32 loc) · 1.07 KB
/
dev.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
43
# Standard library
import os
import sys
# First-party/Local
from cc_legal_tools.settings.base import * # noqa: F403
DEBUG = True
INSTALLED_APPS += [ # noqa: F405
"debug_toolbar",
]
MIDDLEWARE += ( # noqa: F405
"debug_toolbar.middleware.DebugToolbarMiddleware",
)
INTERNAL_IPS = ("127.0.0.1",)
#: Don't send emails, just print them on stdout
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
#: Run celery tasks synchronously
CELERY_ALWAYS_EAGER = True
#: Tell us when a synchronous celery task fails
CELERY_EAGER_PROPAGATES_EXCEPTIONS = True
SECRET_KEY = os.environ.get(
"SECRET_KEY", "_+sc$rvjx-ycj9rkgo4ls81!@clmdjrr=39-#ed7k6cqrq$19f"
)
# Special test settings
if "test" in sys.argv:
PASSWORD_HASHERS = (
"django.contrib.auth.hashers.SHA1PasswordHasher",
"django.contrib.auth.hashers.MD5PasswordHasher",
)
LOGGING["root"]["handlers"] = [] # noqa: F405
# Make it obvious if there are unresolved variables in templates
new_value = "INVALID_VARIABLE(%s)"
TEMPLATES[0]["OPTIONS"]["string_if_invalid"] = new_value # noqa: F405