Skip to content

Commit

Permalink
Alternatives for Django template formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Jun 20, 2024
1 parent be30cb0 commit 20a7b42
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions npm/prettier-django.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,10 @@ Now I can run that command from anywhere on my computer:
```bash
prettier-templates.sh templates/team_backups.html
```

## Alternatives

Jeff Triplett [pointed me](https://mastodon.social/@webology/112646633489421925) to two pure Python alternatives:

- [curlylint](https://curlylint.org) is "experimental HTML templates linting for Jinja, Nunjucks, Django templates, Twig, Liquid" - `pip install curlylint` then `curlylint my/templates`
- [DjHTML](https://github.com/rtts/djhtml) is "a pure-Python Django/Jinja template indenter without dependencies" - `pip install djhtml` then `djhtml template.html`

0 comments on commit 20a7b42

Please sign in to comment.