🍺 BREW Explorer

← all formulae

djhtml

brew install djhtml v3.0.11 GPL-3.0-or-later

Django/Jinja template indenter

14
30-day installs · #7680
58
90-day · #6910
208
365-day · #7271
642
★ GitHub stars · updated 4mo ago

Runtime dependencies

Links

Raw metadata
{
  "aliases": [],
  "alternatives": [],
  "build_dependencies": [],
  "categories": [],
  "caveats": null,
  "conflicts_with": [],
  "dependencies": [
    "python@3.14"
  ],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "Django/Jinja template indenter",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:36:59+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "djhtml",
  "github_default_branch": "main",
  "github_last_commit_at": "2026-04-17T14:26:48Z",
  "github_readme_excerpt": "# DjHTML\n\n***A pure-Python Django/Jinja template indenter without dependencies.***\n\n```jinja\n{% block content %}\n    \u003cblockquote\n        cite=\"Guido Van Rossum\"\n        class=\"Pythonic\"\n    \u003e\n        {% blocktranslate trimmed %}\n            Don\u0027t you hate code that\u0027s not properly indented?\n        {% endblocktranslate %}\n    \u003c/blockquote\u003e\n{% endblock %}\n```\n\nDjHTML indents mixed HTML/CSS/JavaScript templates that contain\n[Django](https://docs.djangoproject.com/en/stable/ref/templates/language/)\nor [Jinja](https://jinja.palletsprojects.com/templates/) template\ntags. It works similar to other code-formatting tools such as\n[Black](https://github.com/psf/black) and interoperates nicely with\n[pre-commit](https://pre-commit.com/).\n\nDjHTML is an _indenter_ and not a _formatter_: it will only add/remove\nwhitespace at the beginning of lines. It will not insert newlines or\nother characters. The goal is to correctly indent already\nwell-structured templates, not to fix broken ones.\n\nIf you are looking for an actual template _formatter_, check out the\n[djangofmt](https://github.com/UnknownPlatypus/djangofmt) project.\n\n\n## Installation\n\nDjHTML requires Python 3.9 or higher and is compatible with all\noperating systems supported by Python. Install DjHTML with the\nfollowing command:\n\n    $ pip install djhtml\n\nNote that\n[Windows still uses legacy code pages](https://docs.python.org/3/using/windows.html#win-utf8-mode)\ninstead of UTF-8. It is highly advised to set the environment variable\n`PYTHONUTF8` to `1` with the\n[setx](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/setx)\ncommand:\n\n    C:\\\u003e setx /m PYTHONUTF8 1\n\n\n## Usage\n\nAfter installation you can indent templates using the `djhtml`\ncommand:\n\n    $ djhtml template.html\n    reindented template.html\n    1 template has been reindented.\n\nYou can also run `djhtml .` to indent all HTML files beneath the\ncurrent directory.\n\nAn exit status of 0 means that everything went well, regardless of\nwhether any f",
  "github_repo": "rtts/djhtml",
  "github_stars": 642,
  "github_topics": [],
  "homepage": "https://github.com/rtts/djhtml",
  "homepage_og_description": null,
  "homepage_og_image": null,
  "homepage_title": null,
  "installs_30d": 14,
  "installs_365d": 208,
  "installs_90d": 58,
  "keg_only": 0,
  "keg_only_reason": null,
  "last_seen": "2026-06-20T23:34:18+00:00",
  "license": "GPL-3.0-or-later",
  "llm_generated_at": null,
  "llm_model": null,
  "name": "djhtml",
  "oldnames": [],
  "one_liner": null,
  "optional_dependencies": [],
  "rank_30d": 7680,
  "rank_365d": 7271,
  "rank_90d": 6910,
  "raw_hash": "2c99d974ae91ea9a",
  "recommended_dependencies": [],
  "revision": 0,
  "ruby_source_path": "Formula/d/djhtml.rb",
  "tap": "homebrew/core",
  "test_dependencies": [],
  "uses_from_macos": [],
  "version_head": null,
  "version_stable": "3.0.11",
  "versioned_formulae": [],
  "why_use_this": null
}