Registry / devops / django-heroku

django-heroku

JSON →
library0.3.1pypypi✓ verified 85d ago

A Django library to configure your app for Heroku. Easily sets up database, static files, and other settings based on Heroku environment. Current version 0.3.1 (last released in 2018, maintenance mode).

pip install django-heroku
INSTALL
IMPORT
SIG · DJANGO-HEROKU
D
django-heroku
devopspythonv0.3.1
Install
Import
Disk
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

django_heroku
import django_heroku
from django_heroku import ...
Import the module, then call django_heroku.settings(locals())

Add at the very bottom of your settings.py file to configure database, static files, and other Heroku-specific settings.

import django_heroku import django.conf.settings as settings # At the bottom of settings.py: django_heroku.settings(settings)
Debug
Known issues
deprecatedThis library is in maintenance mode. The official approach is to use whitenoise, dj-database-url, and gunicorn manually.
fix
Instead of using django-heroku, manually configure using whitenoise and dj-database-url as described in Heroku's official Django guide.
affects: all
gotchadjango_heroku.settings(locals()) must be called AFTER all other settings. If called before, it can override your custom settings like STATICFILES_STORAGE.
fix
Ensure the call is the absolute last line in settings.py.
affects: all
Errors
Common errors & fixes
ImportError: No module named 'django_heroku'
Missing pip install or virtualenv not activated.
fix
Run pip install django-heroku and ensure your virtualenv is active.
TypeError: settings() missing 1 required positional argument: 'django_settings_module'
Calling django_heroku.settings() without passing the settings module (usually locals()).
fix
Use django_heroku.settings(locals()) instead of just django_heroku.settings().
Upgrade
Version history
0.3.1latest on PyPI · released Mar 1, 2018
Audit
Dependencies
dj-database-urlrequiredfor DATABASE_URL parsing
psycopg2requiredPostgreSQL adapter
whitenoiserequiredserving static files
django-appconfrequiredapp configuration helper
Agent activity
10 hits · last 30 days
node
8
Resources
django-heroku — pip install django-heroku · libregistry