This is a fork of the Django library for Heroku apps.
Project description
This is a Django library for Heroku applications that ensures a seamless deployment and development experience.
This library provides:
Settings configuration (Static files / WhiteNoise).
Logging configuration.
Django 4.0 is targeted, but older versions of Django should be compatible.
Usage of dj_config
In settings.py, at the very bottom:
… # Configure Django App for Heroku. import dj_config from dotenv import load_dotenv load_dotenv() # take environment variables django_xconfig.settings(locals())
This will automatically configure DATABASE_URL, ALLOWED_HOSTS, WhiteNoise (for static assets), Logging, and Heroku CI for your application.
Bonus points! If you set the SECRET_KEY environment variable, it will automatically be used in your Django settings, too!
Disabling Functionality
settings() also accepts keyword arguments that can be passed False as a value, which will disable automatic configuration for their specific areas of responsibility:
databases
staticfiles
allowed_hosts
logging
secret_key
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dj_config-0.0.1.tar.gz.
File metadata
- Download URL: dj_config-0.0.1.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9053c7838bc7ee21cd4debcf15b76beca43e9e6b86600492dc2f62d1a8d7b5c8
|
|
| MD5 |
5f595e4c0ad1abaa58229049e51cb891
|
|
| BLAKE2b-256 |
9239298a0438030190c9699b54a84088f5c9cd1f01397885ac1ae86628b9818b
|
File details
Details for the file dj_config-0.0.1-py2.py3-none-any.whl.
File metadata
- Download URL: dj_config-0.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6763a8cbda900b8dc46a17d5d576b28631c5022bce0e079418c26f209a06020
|
|
| MD5 |
e6ea72218bb539ec9deb4575dc8ab24b
|
|
| BLAKE2b-256 |
b07c08e856507c97c4ffb6f9932aaffe81ebd902b35ebc0452d3b7f5eacd710b
|