django-heroku-postgresify
Automatic Django database configuration on Heroku.
Install
To install django-heroku-postgresify, simply run
pip install django-heroku-postgresify and you'll get the latest version
installed automatically.
Usage
Modify your Django settings.py file, and set:
from postgresify import postgresify
DATABASES = 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_URLHEROKU_POSTGRESQL_RED_URLHEROKU_SHARED_POSTGRESQL_RED_URLSHARED_DATABASE_URLDATABASE_URL
Your DATABASES setting would be:
DATABASES = {
'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
},
'SHARED_RED': {
# HEROKU_SHARED_POSTGRESQL_RED_URL configs here
},
}
References
If you're confused, you should probably read:
Tests
Want to run the tests? No problem:
$ git clone git://github.com/rdegges/django-heroku-postgresify.git
$ cd django-heroku-postgresify
$ python setup.py develop
...
$ pip install -r requirements.txt # Install test dependencies.
$ nosetests
.............
----------------------------------------------------------------------
Ran 13 tests in 0.166s
OK
Metadata
Release files for django-heroku-postgresify 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-heroku-postgresify-0.4.1.tar.gz | 76.9 kB | Without provenance | Details for django-heroku-postgresify-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_heroku_postgresify-0.4.1-py3-none-any.whl | Python 3 | none | any | Details for django_heroku_postgresify-0.4.1-py3-none-any.whl |
Total release size: 79.8 kB
Release files / django-heroku-postgresify-0.4.1.tar.gz
| Download URL | django-heroku-postgresify-0.4.1.tar.gz |
|---|---|
| Size | 76.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b348e797317ef17228c34ea5911aee056714d021b65fad2bdf470eff599eb691
|
|
BLAKE2b-256 checksum How to use checksums |
5e258f698d2211f65cd56eaa0f341c3ea7bf76addcd4116de1430cd965a73047
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
|
Release files / django_heroku_postgresify-0.4.1-py3-none-any.whl
| Download URL | django_heroku_postgresify-0.4.1-py3-none-any.whl |
|---|---|
| Size | 2.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
02c6a6a03038f739f082ba1a141d802526de6cc269b1cef604c6c2ea934994d3
|
|
BLAKE2b-256 checksum How to use checksums |
c68b3c8d7f43da70abd3153b524efbb60ce0adab64be560530aa36e5192f33e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
|
Security for django-heroku-postgresify 0.4.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.