diff options
author | Akash Chavan | 2020-07-29 14:51:26 +0530 |
---|---|---|
committer | GitHub | 2020-07-29 14:51:26 +0530 |
commit | 85be587312615def9ae87c3cbf3f532af385d420 (patch) | |
tree | 48a97732306ea880630eab8fb74fd39b476b4b33 /workshop_portal | |
parent | 5b593457c0d07a6c11884c33ec7c676de9510b9d (diff) | |
parent | 4ab63184215475baf0940a1ab04d8fb990181e20 (diff) | |
download | workshop_booking-85be587312615def9ae87c3cbf3f532af385d420.tar.gz workshop_booking-85be587312615def9ae87c3cbf3f532af385d420.tar.bz2 workshop_booking-85be587312615def9ae87c3cbf3f532af385d420.zip |
Merge pull request #156 from CruiseDevice/revampv2
Workshop app migrations
Diffstat (limited to 'workshop_portal')
-rw-r--r-- | workshop_portal/settings.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/workshop_portal/settings.py b/workshop_portal/settings.py index abf58f5..2dfeb08 100644 --- a/workshop_portal/settings.py +++ b/workshop_portal/settings.py @@ -21,6 +21,8 @@ from local_settings import ( SENDER_EMAIL ) +from decouple import config + # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @@ -82,11 +84,14 @@ WSGI_APPLICATION = 'workshop_portal.wsgi.application' # https://docs.djangoproject.com/en/1.10/ref/settings/#databases DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), - 'TEST': { - 'NAME': 'mytestdatabase', - }, + 'ENGINE': 'django.db.backends.{0}'.format( + config('DB_ENGINE', default='sqlite3') + ), + 'NAME': config('DB_NAME', default=os.path.join(BASE_DIR, 'db.sqlite3')), + 'USER': config('DB_USER', default=''), + 'PASSWORD': config('DB_PASSWORD', default=''), + 'HOST': config('DB_HOST', default='localhost'), + 'PORT': config('DB_PORT', default='') } } |