skillfed

djade

A Django template formatter.

djade v1.9.0 131.7K downloads/30d#11,581 on PyPI388
Permissive license MIT Active released

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 djade

uv

uv add djade

poetry

poetry add djade

Installing 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

Development Status :: 5 - Production/StableFramework :: DjangoIntended Audience :: DevelopersNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

django template formatterformat django templatesdjango code styletemplate linter djangodjango template syntax checkerpre-commit django templatesdjango template beautifier
djangoformatterrust-based

More Markup packages