Brenton Cleeland
@sesh // brntn.me
> heroku --help
Usage: heroku COMMAND [--app APP] [command-specific-options]
Primary help topics, type "heroku help TOPIC" for more details:
addons # manage addon resources
apps # manage apps (create, destroy)
auth # authentication (login, logout)
config # manage app config vars
domains # manage custom domains
logs # display logs for an app
ps # manage dynos (dynos, workers)
releases # manage app releases
run # run one-off commands (console, rake)
sharing # manage collaborators on an app
https://toolbelt.heroku.com/
# settings.py
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
import dj_database_url
DATABASES = {
'default': dj_database_url.config(default='sqlite:///{}'.format(
DATABASES['default']['NAME'])
)
}
https://github.com/kennethreitz/dj-database-url
# wsgi.py
from django.core.wsgi import get_wsgi_application
from whitenoise.django import DjangoWhiteNoise
application = DjangoWhiteNoise(get_wsgi_application())
# settings.py
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
https://github.com/evansd/whitenoise
# Procfile
web: gunicorn melbdjangoheroku.wsgi --log-file -
http://gunicorn.org
# settings.py
DEBUG = os.uname()[0] == 'Darwin'
TEMPLATE_DEBUG = DEBUG
ALLOWED_HOSTS = ['.herokuapp.com']
# requirements.txt
Django==1.7.4
dj-database-url==0.3.0
gunicorn==19.2.1
whitenoise==1.0.6
psycopg2==2.6
http://slides.com/brntn/managing-your-django-requirements/#/