Newer
Older
from .base import * # noqa
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'CHANGEME!!!'
INTERNAL_IPS = ('127.0.0.1', '10.0.2.2')
ALLOWED_HOSTS = ['apply.localhost', 'localhost', '127.0.0.1']
BASE_URL = 'http://localhost:8000'
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
AUTH_PASSWORD_VALIDATORS = []
INSTALLED_APPS = INSTALLED_APPS + [
'wagtail.contrib.styleguide',
# Change these in local.py.
LOCAL_FILE_LOGGING = False
LOCAL_FILE_EMAIL = False
try:
from .local import * # noqa
except ImportError:
pass
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# We add these here so they can react on settings made in local.py.
# E-mail to local files.
if LOCAL_FILE_EMAIL:
EMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend'
EMAIL_FILE_PATH = BASE_DIR + '/var/mail'
# Local logging to file.
if LOCAL_FILE_LOGGING:
LOGGING = {
'version': 1,
'disable_existing_loggers': True,
'formatters': {
'standard': {
'format': "[%(asctime)s] %(levelname)s [%(name)s:%(lineno)s] %(message)s",
'datefmt': "%Y-%m-%d %H:%M:%S"
},
},
'handlers': {
'null': {
'level': 'DEBUG',
'class': 'logging.NullHandler',
},
'logfile': {
'level': 'DEBUG',
'class': 'logging.handlers.RotatingFileHandler',
'filename': BASE_DIR + '/var/log/debug.log',
'maxBytes': 1000000,
'backupCount': 2,
'formatter': 'standard',
},
},
'loggers': {
'django': {
'handlers': ['logfile'],
'level': 'INFO',
'propagate': True,
},
'django.db.backends': {
'handlers': ['logfile'],
'level': 'INFO',
'propagate': False,
},
'django.request': {
'handlers': ['logfile'],
'level': 'DEBUG',
'propagate': False,
},
'django.template': {
'handlers': ['logfile'],
'level': 'INFO',
'propagate': False,
},
'django.security': {
'handlers': ['logfile'],
'level': 'DEBUG',
'propagate': False,
},
'wagtail': {
'handlers': ['logfile'],
'level': 'DEBUG',
},
'opentech': {
'handlers': ['logfile'],
'level': 'DEBUG',
},
}
}
# Set up the Django debug toolbar. See also root urls.py.
if DEBUGTOOLBAR:
INSTALLED_APPS += [
'debug_toolbar',
]
MIDDLEWARE = [
'debug_toolbar.middleware.DebugToolbarMiddleware',
] + MIDDLEWARE