Skip to content

Commit

Permalink
removed django_heroku
Browse files Browse the repository at this point in the history
  • Loading branch information
UKnowWhoIm committed Jan 18, 2021
1 parent 6655d39 commit 1cddf31
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
18 changes: 7 additions & 11 deletions StudentMailBenifits/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
import dotenv
import dj_database_url
from pathlib import Path
import django_heroku
import os

# Build paths inside the project like this: BASE_DIR / 'subdir'.
Expand All @@ -28,7 +28,7 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = os.environ.get("DEBUG", "True") != "False"

ALLOWED_HOSTS = []
ALLOWED_HOSTS = [".herokuapp.com"]


# Application definition
Expand Down Expand Up @@ -82,14 +82,6 @@

# POSTGRES Setup
DATABASES = {
'default': dj_database_url.config(
default=config('DATABASE_URL')
)
}

"""
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': os.environ.get("DATABASE_NAME"),
Expand All @@ -99,6 +91,9 @@
'PORT': os.environ.get("DATABASE_PORT"),
}
}

"""
# Uncomment to use SQLITE db
DATABASES = {
'default': {
Expand All @@ -108,6 +103,8 @@
}
"""

db_from_env = dj_database_url.config(conn_max_age=500)
DATABASES['default'].update(db_from_env)


# Password validation
Expand Down Expand Up @@ -147,4 +144,3 @@
# https://docs.djangoproject.com/en/3.1/howto/static-files/

STATIC_URL = '/static/'
django_heroku.settings(locals())
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ Django==3.1.5
django-filter==2.4.0
djangorestframework==3.12.2
gunicorn==20.0.4
psycopg2-binary==2.8.6
psycopg2==2.8.6
django-heroku==
python-dotenv==0.15.0
pytz==2020.5
sqlparse==0.4.1
Expand Down

0 comments on commit 1cddf31

Please sign in to comment.