We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d960ff9 commit 979c5d2Copy full SHA for 979c5d2
1 file changed
tutorial/settings.py
@@ -11,6 +11,7 @@
11
"""
12
13
import os
14
+import dj_database_url
15
16
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
17
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@@ -73,10 +74,10 @@
73
74
# https://docs.djangoproject.com/en/1.11/ref/settings/#databases
75
76
DATABASES = {
- 'default': {
77
- 'ENGINE': 'django.db.backends.sqlite3',
78
- 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
79
- }
+ 'default':
+ dj_database_url.config(
+ default='sqlite:///{}'.format(os.path.join(BASE_DIR, 'db.sqlite3'))
80
+ )
81
}
82
83
# Password validation
0 commit comments