From edf42ccae8242ede53281ec0798adfd3620b080a Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Wed, 17 Feb 2021 17:04:36 -0500 Subject: [PATCH] Update django.md --- django.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/django.md b/django.md index 8c95632..5d2030d 100644 --- a/django.md +++ b/django.md @@ -299,6 +299,14 @@ CORS_ALLOW_ALL_ORIGINS = True # add this ![](https://imgur.com/AVlB8kK.png) +1. At the top of `django_rest_api/settings.py` add `import dj_database_url` +1. Further down `django_rest_api/settings.py` make the following change: + +```python +db_from_env = dj_database_url.config(conn_max_age=600) +DATABASES['default'].update(db_from_env) +``` + ### On the Browser 1. Go to your heroku dashboard for the heroku project you just created