django-heroku-postgresify

Automatic Django database configuration on Heroku
Download

django-heroku-postgresify Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Public Domain
  • Price:
  • FREE
  • Publisher Name:
  • Randall Degges
  • Publisher web site:
  • http://github.com/comradeb14ck/

django-heroku-postgresify Tags


django-heroku-postgresify Description

django-heroku-postgresify is a Django app that provides automatic Django database configuration on Heroku. InstallTo install ``django-heroku-postgresify``, simply run ``pip install django-heroku-postgresify`` and you'll get the latest version installed automatically.UsageModify your Django ``settings.py`` file, and set:``` pythonfrom postgresify import postgresifyDATABASES = postgresify()```That's it.Depending on the Heroku PostgreSQL databases you've got installed, your ``DATABASES`` configuration will automatically be setup to use them.For example, let's assume you've got the following environment variables set on Heroku (you can view the list of all environment variables by running ``heroku config``):- ``HEROKU_POSTGRESQL_BLUE_URL``- ``HEROKU_POSTGRESQL_RED_URL``- ``SHARED_DATABASE_URL``- ``DATABASE_URL``Your ``DATABASES`` setting would be:``` pythonDATABASES = { 'default': { # DATABASE_URL configs here }, 'SHARED': { # SHARED_DATABASE_URL configs here }, 'BLUE': { # HEROKU_POSTGRESQL_BLUE_URL configs here }, 'RED': { # HEROKU_POSTGRESQL_RED_URL configs here },}```Product's homepage


django-heroku-postgresify Related Software