Registry / web-framework / django-extensions

django-extensions

JSON →
library4.1pypypi✓ verified 26d ago

Django Extensions is a comprehensive collection of custom extensions for the Django Framework, designed to enhance development workflow. It includes a wide array of management commands (e.g., `shell_plus`, `runserver_plus`, `graph_models`), additional database fields, and admin interface improvements. Currently at version 4.1, it maintains an active release cadence, frequently updating to support the latest Django and Python versions.

pip install django-extensions
INSTALL
IMPORT
SIG · DJANGO-EXTENSIONS
D
django-extensions
web-frameworkpythonv4.1
Install
3.6s avg
Import
22ms
Disk
68MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v4.1 · pip install
no network on importno background threads
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
installs and imports cleanly · install 0.0s · import 0.022s · 68.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.6s · import 0.022s · 69MB
68MB installed
● package 68MB
Code
Verified usage

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

VERSION
from django_extensions import VERSION
from django_extensions.db.fields import AutoSlugField
get_version
from django_extensions import get_version
from django_extensions.db.fields import AutoSlugField

To integrate Django Extensions into your project, add 'django_extensions' to your `INSTALLED_APPS` setting. After installation, you can immediately access the enhanced management commands through `python manage.py <command_name>`.

# settings.py INSTALLED_APPS = [ # ... other Django apps 'django_extensions', # ... ] # Then, run management commands from your project root: # python manage.py shell_plus # python manage.py runserver_plus # python manage.py graph_models -a -o my_project_models.png
Debug
Known issues
breakingStarting with version 4.0, Django Extensions transitioned from `setup.cfg` / `setup.py` to `pyproject.toml` for project configuration. This change primarily affects packaging and build systems for contributors or those installing from source.
fix
Ensure your build tooling (e.g., pip, build) is up-to-date and supports `pyproject.toml` based builds. For most users installing via `pip install django-extensions`, this change is transparent.
affects: 4.0+
breakingThe `mail_debug` command was updated in version 4.0 to use `aiosmtpd` for its SMTP server implementation. The old `smtpd` module from the Python standard library is deprecated in Python 3.6 and removed in Python 3.12.
fix
Install the `aiosmtpd` package (`pip install aiosmtpd`) if you use the `mail_debug` command. Ensure your Python version is compatible with `aiosmtpd` (Python >=3.9 for `aiosmtpd` 1.4.6).
affects: 4.0+
gotchaThe `graph_models` command, while requiring Python packages like `pygraphviz` or `pydot`, also relies on a *system-wide* installation of Graphviz to render images. Without it, the command will fail even if Python dependencies are met.
fix
Install Graphviz on your operating system (e.g., `sudo apt-get install graphviz` on Debian/Ubuntu, `brew install graphviz` on macOS, or download from graphviz.org for Windows) and ensure its executables are in your system's PATH.
affects: All
gotchaThe `runserver_plus` command requires `Werkzeug`. While typically installing `Werkzeug` resolves this, some users have reported issues with specific `Werkzeug` versions leading to `CommandError: Werkzeug is required...` or `KeyError: 'werkzeug.server.shutdown'`.
fix
Ensure `Werkzeug` is installed (`pip install Werkzeug`). If errors persist, try downgrading `Werkzeug` to a known stable version (e.g., `Werkzeug==0.16.1` has been a historical workaround for some users) or check for specific compatibility notes in the `django-extensions` changelog.
affects: All
deprecatedThe `passwd` management command was deprecated in version 3.0.0. Its functionality is now superseded by Django's built-in `changepassword` command.
fix
Migrate any scripts or workflows using `python manage.py passwd` to `python manage.py changepassword`.
affects: 3.0.0+
breakingDjango Extensions 4.1 officially requires Django 4.2 or later and Python 3.9 or later. Version 4.0 introduced support for Django 5.x and Python 3.12/3.13.
fix
Ensure your Django project runs on Django 4.2+ and your Python environment is 3.9+. For newer projects, consider Django 5.x and Python 3.12+ for full compatibility with the latest features and improvements.
affects: 4.1+
Upgrade
Version history
4.1latest on PyPI · released Apr 11, 2025
Audit
Dependencies
WerkzeugoptionalRequired for the `runserver_plus` management command for enhanced debugging capabilities.
pygraphvizoptionalOptional, but highly recommended for `graph_models` to output directly to image files. Requires system-wide Graphviz installation.
pydotoptionalOptional, alternative to `pygraphviz` for `graph_models` to output directly to image files. Requires system-wide Graphviz installation.
aiosmtpdoptionalRequired for the `mail_debug` management command (as of version 4.0).
vobjectoptionalRequired for the `export_emails` management command.
Agent activity
16 hits · last 30 days
node
14
Resources
django-extensions — pip install django-extensions · libregistry