From 04381660ba7b6167f650c8b7bd8c360f59314f43 Mon Sep 17 00:00:00 2001 From: Muremwa Date: Tue, 18 Sep 2018 14:49:36 +0300 Subject: [PATCH] i hope this changes --- note/settings.py | 15 ++------------- requirements.txt | 3 ++- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/note/settings.py b/note/settings.py index 4e981b2..8bc4970 100644 --- a/note/settings.py +++ b/note/settings.py @@ -1,5 +1,6 @@ import os import dj_database_url +import django_heroku # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @@ -128,16 +129,4 @@ MEDIA_ROOT = os.path.join(BASE_DIR, 'media') MEDIA_URL = '/media/' # STATIC_ROOT = os.path.join(BASE_DIR, 'note/static') - - -db_from_env = dj_database_url.config(conn_max_age=500) - -DATABASES['default'].update(db_from_env) - -PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) - -STATIC_ROOT = os.path.join(PROJECT_ROOT, 'staticfiles') - -STATICFILES_DIRS = (os.path.join(PROJECT_ROOT, 'static'),) - -STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage' +django_heroku.settings(locals()) diff --git a/requirements.txt b/requirements.txt index 5896ced..43e1be3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,4 +7,5 @@ markdown2==2.3.5 Pillow==5.1.0 gunicorn djangorestframework -whitenoise==3.0 \ No newline at end of file +whitenoise==3.0 +django-heroku \ No newline at end of file