It's been a while since I used heroku, but iirc it just uses a formatted pg url.
Install the module dj-database-url and use this in settings instead of the
default DATABASES layout, something like:
DATABASES = {
'default': dj_database_url.config(os.environ['DATABASE_URL'],
conn_max_age=1800)
}
Then set DATABASE_URL in the heroku (and your development) environment. This
setting will be of the form:
DATABASE_URL=postgresql://<username>:<password>@<host>:<port>/<databasename>
Again, its been a while but I also seem to recall that the DATABASE_URL is
provided to your app automagically(?) a part of the provisioning so does not
need to be explicitly set there. Using the dj_database_url module in your
settings above is the key.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/652C078D-78A3-4208-95A3-554DB0FA06A6%40uniquode.io.