{"categories":[{"label":"HTML","url":"https://skillfed.io/packages/category/text-processing-markup-html"}],"enrichment":{"capability":"DjHTML indents Django and Jinja template files containing mixed HTML, CSS, and JavaScript by adding or removing leading whitespace, without inserting newlines or reformatting content.","skillfed_tags":["django","jinja","pre-commit"],"use_cases":["Automatically indent all Django templates in a project before each commit using pre-commit hooks.","Fix indentation inconsistencies in Jinja templates across a codebase without altering template logic.","Maintain consistent whitespace in mixed HTML/CSS/JavaScript template files during development.","Dry-run indentation checks on templates using the --check flag to verify formatting without modifying files.","Define custom block tags for non-standard template syntax and apply consistent indentation rules."],"what_it_does":"DjHTML is a pure-Python indentation tool designed specifically for Django and Jinja templates that mix HTML, CSS, and JavaScript. Unlike general formatters, it operates as an indenter\u2014it adjusts only leading whitespace on each line without inserting newlines, removing content, or restructuring code. This makes it suitable for fixing indentation in already well-structured templates while leaving the template logic and content untouched.\n\nThe tool works as a command-line utility and integrates cleanly with pre-commit hooks for automated indentation on every commit. It supports three modes (DjHTML, DjCSS, and DjJS) that activate automatically when encountering style or script tags, and allows fine-grained control via command-line options like custom tab width and extra block tag definitions. It also respects fmt:off/fmt:on markers and ignores content inside comments and special template tags.","worth_installing":"Yes. DjHTML is actively maintained, has no runtime dependencies, installs easily, and solves a specific problem well\u2014indenting Django/Jinja templates without reformatting content. The GPLv3+ license is a consideration for proprietary projects, but the tool is ideal for open-source Django/Jinja workflows, especially when integrated with pre-commit. No known security vulnerabilities."},"id":"djhtml","links":{"html":"https://skillfed.io/packages/djhtml","md":"https://skillfed.io/packages/djhtml.md","pypi":"https://pypi.org/project/djhtml/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-03-26","license_spdx":null,"license_treatment":"copyleft","name":"djhtml","python_support":"unspecified","summary":"Django/Jinja template indenter"},"popularity":{"monthly_downloads":507180,"position":6283,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"3.0.11"}
