Skip to content

Django template linter and formatter

djLint lints and formats Django templates. Set the django profile so the rules and the formatting fit them.

What is Django?

Terminal window
djlint /path/to/templates --profile=django

Configure djLint in your project’s pyproject.toml, djlint.toml / .djlint.toml, or .djlintrc file.

pyproject.toml
[tool.djlint]
profile = "django"
djlint.toml / .djlint.toml
profile = "django"
.djlintrc
{ "profile": "django" }