Skip to main content

Django template indenter

Project description

DJHTML

Finally! An elegant Django template indenter without any dependencies!

Installation

First, add the following to your .pre-commit-config.yaml:

repos:
- repo: https://github.com/rtts/djhtml
  rev: main
  hooks:
  - id: djhtml

Then run the following command:

$ pre-commit autoupdate

Results

Before:

{% block extrahead %}
<script>
function f() {
return 42;
}
</script>
{% endblock %}

After:

{% block extrahead %}
    <script>
        function f() {
            return 42;
        }
    </script>
{% endblock %}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

djhtml-0.0.1.tar.gz (3.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page