#Install The Following Packages Django==2.0.7 # django dj-database-url==0.5.0 # for your database whitenoise==4.0 # to manage your static files on heroku gunicorn==19.9.0 # to deploy your app on heroku django-heroku==0.3.1
#Include the following on your .gitignore file *.pyc *.pyo pycache/ db.sqlite3 notes.md !Note do not include your migrations
$ source bin/activate - #ubuntu users
web: gunicorn .wsgi --log-file - #Note should be the folder where wsgi is located
''' At the beginning of settings.py ''' import dj_database_url # heroku import django_heroku # heroku
ALLOWED_HOSTS = ['127.0.0.1', 'localhost', 'hack-jos.herokuapp.com'] # heroku
INSTALLED_APPS = [ .....# 'whitenoise.runserver_nostatic', # heroku, whitenoise python manage.py runserver --nostatic
]
MIDDLEWARE = [ 'whitenoise.middleware.WhiteNoiseMiddleware', # heroku manageing static files ]
DATABASES = { 'default' : { 'ENGINE':'django.db.backends.postgresql_psycopg2', 'NAME': 'DB_NAME', # name of your database 'USER':'DB_USER', # user you created when creating your database 'PASSWORD':'DB_PASS', # password 'HOST':'localhost',# host 'PORT':'5432' # port } } Note when deploying on Heroku you are gonna use postgres
Will Still Udate It