heroku deployment

master
Matt Huntington 5 years ago
parent 12ff9e7843
commit 6fab2631a4

Binary file not shown.

@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/3.1/ref/settings/
""" """
from pathlib import Path from pathlib import Path
import dj_database_url # add this
# Build paths inside the project like this: BASE_DIR / 'subdir'. # Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent BASE_DIR = Path(__file__).resolve().parent.parent
@ -25,7 +26,7 @@ SECRET_KEY = '6d*ktt0=6-!)i1bdxk4(^)*ls-eseg(k12m2vefor1-g@vc5kn'
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True DEBUG = True
ALLOWED_HOSTS = [] ALLOWED_HOSTS = ['localhost', 'desolate-thicket-29906.herokuapp.com']
# Application definition # Application definition
@ -89,6 +90,8 @@ DATABASES = {
} }
} }
db_from_env = dj_database_url.config(conn_max_age=600) # add this
DATABASES['default'].update(db_from_env) # add this
# Password validation # Password validation
# https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators # https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators

@ -0,0 +1,9 @@
asgiref==3.3.1
dj-database-url==0.5.0
Django==3.1.6
django-cors-headers==3.7.0
djangorestframework==3.12.2
gunicorn==20.0.4
psycopg2-binary==2.8.6
pytz==2021.1
sqlparse==0.4.1
Loading…
Cancel
Save