Skip to content

Commit

Permalink
Major Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
artofnuel committed Aug 15, 2022
1 parent 50bbc8f commit 296762f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
release: python manage.py migrate --no-input
web: gunicorn movie.wsgi
14 changes: 14 additions & 0 deletions movie/prod_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
""" Production Settings """
# default: use settings from main settings.py if not overwritten
from .settings import *

import django_heroku


DEBUG = False
SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', SECRET_KEY)
# adjust to the URL of your Heroku app
ALLOWED_HOSTS = ['django-hello-world-app.herokuapp.com']

# Activate Django-Heroku.
django_heroku.settings(locals())
9 changes: 3 additions & 6 deletions movie/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.0/ref/settings/
"""
import django_heroku
from django.conf import settings

from pathlib import Path
import os

Expand Down Expand Up @@ -46,6 +45,7 @@
]

MIDDLEWARE = [
'whitenoise.middleware.WhiteNoiseMiddleware',
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
Expand Down Expand Up @@ -132,7 +132,7 @@

MEDIA_URL='/media/'
MEDIA_ROOT=BASE_DIR/'media'
STATIC_ROOT = os.path.join(BASE_DIR/'static_root')
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')

STATICFILES_DIRS=[
BASE_DIR/'static'
Expand All @@ -153,6 +153,3 @@


LOGIN_REDIRECT_URL = "movies:all_movies"

# Activate Django-Heroku
django_heroku_settings(locals())

0 comments on commit 296762f

Please sign in to comment.