Skip to content

Nunjucks template linter and formatter

djLint lints and formats Nunjucks templates. Set the nunjucks profile so the rules and the formatting fit them.

What is Nunjucks?

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

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

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