Skip to content

Commit

Permalink
heroku settings
Browse files Browse the repository at this point in the history
  • Loading branch information
SumitMahar committed Jul 25, 2021
1 parent 0745251 commit 704d34b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: gunicorn config.wsgi --log-file -
19 changes: 9 additions & 10 deletions config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
"""

from pathlib import Path
from environs import Env

env = Env()
env.read_env()

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
Expand All @@ -20,12 +24,11 @@
# See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'm$7zw96+x7hk7wv*qdgbul+#p4r+030svtm3%$vh@l$f0+wh&m72'
SECRET_KEY = env.str("SECRET_KEY")

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False

ALLOWED_HOSTS = ['localhost', 'herokuapp', 'pythonanywhere', '.herokuapp', '.pythonanywhere']
DEBUG = env.bool("DEBUG", default=False)
ALLOWED_HOSTS = ['localhost', '.herokuapp', '.pythonanywhere', ]


# Application definition
Expand Down Expand Up @@ -81,12 +84,8 @@
# Database
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}
DATABASES = {"default": env.dj_db_url("DATABASE_URL")}



# Password validation
Expand Down

0 comments on commit 704d34b

Please sign in to comment.