jazzband / dj-database-url

Use Database URLs in your Django Application.
https://pypi.org/project/dj-database-url/
BSD 3-Clause "New" or "Revised" License
1.49k stars 205 forks source link

Document the 'env' parameter #54

Closed edmorley closed 8 years ago

edmorley commented 9 years ago

dj-database-url defaults to reading in the value of DATABASE_URL, but this can be overridden using env, like so:

DATABASES = {
    'default': dj_database_url.config(),
    'read_only': dj_database_url.config(env='DATABASE_URL_RO')
}

It would be good to mention this in the README. I'll open a PR when I get a chance soon, if someone hasn't beaten me to it :-)

kennethreitz commented 8 years ago

Will consider it :)