djade
A Django template formatter.
What it is and what it does
Djade is a standalone command-line tool that formats Django template files according to Django's official style guide. It's written in Rust and benchmarked to format 377 templates in 20ms, making it fast enough for pre-commit hooks and bulk formatting workflows. It focuses exclusively on Django template syntax (tags, variables, comments, filters) and does not attempt to format HTML or other host languages, since whitespace can be semantically significant in those contexts.
Beyond formatting, Djade can upgrade template syntax to a target Django version, automatically detecting the version from pyproject.toml if available. It integrates with pre-commit, operates as a command-line tool that rewrites files in place, and supports reading from stdin and writing to stdout. It has no runtime dependencies and requires Python 3.10 or later.
Use it for:
- Enforce consistent Django template style across a team by installing as a pre-commit hook that runs on every commit
- Bulk-format an existing Django project's templates to comply with the Django style guide in a single pass
- Upgrade template syntax when migrating to a newer Django version, using the --target-version flag
- Integrate template formatting into CI/CD pipelines using the --check flag to verify compliance without modifying files
- Format individual template files on demand from the command line or as part of custom build scripts
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Djade is a command-line formatter for Django template syntax, built in Rust for speed, that rewrites template files in place according to Django's style guide and can upgrade old template syntax to target Django versions.
Yes, if you maintain Django templates and want fast, opinionated formatting aligned with Django's style guide. The tool is actively maintained, has no external dependencies, and integrates cleanly with pre-commit. Install friction is medium due to compiled wheels, but pre-built binaries are available for all major platforms. MIT license and zero known vulnerabilities make it a low-risk addition.
Install
djade on PyPI
pip
pip install djadeuv
uv add djadepoetry
poetry add djadeInstalling djade
Before you install
Medium install friction due to platform-specific wheels (compiled Rust binary), but pre-built wheels are available for common architectures. Active maintenance with recent releases; last commit 2026-08-04.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.
Quickstart
pip install djade
djade templates/engine.html
# Or with target Django version:
djade --target-version 6.0 templates/engine.html
Requires Python 3.10 or later. Pre-built wheels available for macOS (x86_64, arm64), Linux (x86_64, aarch64, armv7l), and Windows (amd64, arm64); other platforms may require compilation.
Verify before relying
- Whether Djade's syntax upgrade fixers cover all deprecated Django template features or only a subset
- Performance characteristics on very large template files or directories with thousands of templates
- Compatibility with template syntax from Django template engines other than the default
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 168 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 131,657/month — #11,581 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: djade-1.9.0-py3-none-macosx_10_12_x86_64.whl; djade-1.9.0-py3-none-macosx_11_0_arm64.whl; djade-1.9.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; djade-1.9.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; djade-1.9.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; djade-1.9.0-py3-none-musllinux_1_1_aarch64.whl; djade-1.9.0-py3-none-musllinux_1_1_x86_64.whl; djade-1.9.0-py3-none-win_amd64.whl; djade-1.9.0-py3-none-win_arm64.whl
Keywords: Django
Tags
More Markup packages
PyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
markdown-it-pyA Python markdown parser that converts markdown…
permissive · top 100 on PyPI
beautifulsoup4Beautiful Soup parses HTML and XML documents…
permissive · top 100 on PyPI
et-xmlfileet_xmlfile writes large XML files with minimal…
permissive · top 1,000 on PyPI
tomlkitParses and edits TOML files while preserving…
permissive · top 1,000 on PyPI
docstring-parserParses Python docstrings in ReST, Google,…
permissive · top 1,000 on PyPI
django-template-partialsProvides reusable named template partials for…
permissive · top 15,000 on PyPI
djlintdjlint formats and lints HTML templates with…
copyleft · top 5,000 on PyPI
django-upgradeAutomatically modernizes Django project code by…
permissive · top 15,000 on PyPI
djhtmlDjHTML indents Django and Jinja template files…
copyleft · top 15,000 on PyPI
DjangoDjango is a high-level Python web framework for…
permissive · top 1,000 on PyPI
curlylintLints HTML templates in Jinja, Nunjucks,…
permissive · top 15,000 on PyPI
Jinja2Jinja2 is a templating engine that renders…
permissive · top 100 on PyPI
django-jinjaIntegrates Jinja2 templating into Django,…
permissive · top 15,000 on PyPI
django-render-blockRender a specific block from a Django template…
permissive · top 15,000 on PyPI
django-prettyjsonAdds a collapsible, interactive JSON viewer…
permissive · top 15,000 on PyPI