-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy pathdev.py
More file actions
82 lines (56 loc) · 1.67 KB
/
Copy pathdev.py
File metadata and controls
82 lines (56 loc) · 1.67 KB
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
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
"""
Development settings for patchwork project.
These are also used in unit tests.
Design based on:
http://www.revsys.com/blog/2014/nov/21/recommended-django-project-layout/
"""
from .base import * # noqa
try:
import dbbackup
except ImportError:
dbbackup = None
try:
import debug_toolbar
except ImportError:
debug_toolbar = None
#
# Core settings
# https://docs.djangoproject.com/en/2.2/ref/settings/#core-settings
#
ADMINS = (('Joe Bloggs', 'jbloggs@example.com'),)
ALLOWED_HOSTS = ['*']
SECRET_KEY = '00000000000000000000000000000000000000000000000000' # noqa
DEBUG = True
if DATABASES['default']['ENGINE'] == 'mysql': # noqa: F405
DATABASES['default']['TEST'] = {'CHARSET': 'utf8'} # noqa: F405
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
#
# Auth settings
# https://docs.djangoproject.com/en/2.2/ref/settings/#auth
#
# Use a faster, though less secure, password hasher for faster tests
# https://docs.djangoproject.com/en/2.2/topics/testing/overview/#password-hashing
PASSWORD_HASHERS = ['django.contrib.auth.hashers.MD5PasswordHasher']
#
# Third-party application settings
#
# django-debug-toolbar
if debug_toolbar:
INSTALLED_APPS += ['debug_toolbar'] # noqa: F405
DEBUG_TOOLBAR_PATCH_SETTINGS = False
# This should go first in the middleware classes
MIDDLEWARE = [
'debug_toolbar.middleware.DebugToolbarMiddleware',
] + MIDDLEWARE # noqa: F405
INTERNAL_IPS = ['127.0.0.1', '::1', '172.18.0.1']
# django-dbbackup
if dbbackup:
INSTALLED_APPS += [
'dbbackup',
]
DBBACKUP_STORAGE_OPTIONS = {'location': '.backups'}
#
# Patchwork settings
#
ENABLE_XMLRPC = True
ENABLE_REST_API = True