· 7 years ago · Feb 15, 2018, 12:10 AM
1from .base import * # noqa
2
3
4# DEBUG
5# ------------------------------------------------------------------------------
6# Turn debug off so tests run faster
7DEBUG = False
8# coverage throws error unless the following is set to True
9TEMPLATES[0]['OPTIONS']['debug'] = True
10
11# SECRET CONFIGURATION
12# ------------------------------------------------------------------------------
13# See: https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
14# Note: This key only used for development and testing.
15SECRET_KEY = env('DJANGO_SECRET_KEY', default='CHANGEME!!!')
16
17# Mail settings
18# ------------------------------------------------------------------------------
19EMAIL_HOST = 'localhost'
20EMAIL_PORT = 1025
21
22# In-memory email backend stores messages in django.core.mail.outbox
23# for unit testing purposes
24EMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend'
25
26# CACHING
27# ------------------------------------------------------------------------------
28# Speed advantages of in-memory caching without having to run Memcached
29CACHES = {
30 'default': {
31 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
32 'LOCATION': ''
33 }
34}
35
36# TESTING
37# ------------------------------------------------------------------------------
38TEST_RUNNER = 'django.test.runner.DiscoverRunner'
39
40
41# PASSWORD HASHING
42# ------------------------------------------------------------------------------
43# Use fast password hasher so tests run faster
44PASSWORD_HASHERS = [
45 'django.contrib.auth.hashers.MD5PasswordHasher',
46]
47
48# TEMPLATE LOADERS
49# ------------------------------------------------------------------------------
50# Keep templates in memory so tests run faster
51TEMPLATES[0]['OPTIONS']['loaders'] = [
52 ['django.template.loaders.cached.Loader', [
53 'django.template.loaders.filesystem.Loader',
54 'django.template.loaders.app_directories.Loader',
55 ], ],
56]