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-extensionsVerified import paths — ran on the pinned version, not inferred.
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>`.
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.
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).
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.
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.
Migrate any scripts or workflows using `python manage.py passwd` to `python manage.py changepassword`.
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.