Add djlint pre-commit hook

This commit is contained in:
Edgar P. Burkhart 2023-04-18 19:01:41 +02:00
parent d0cfc2d729
commit 044a7f1c06
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
13 changed files with 40 additions and 47 deletions

View file

@ -8,3 +8,8 @@ repos:
rev: 23.3.0 rev: 23.3.0
hooks: hooks:
- id: black - id: black
- repo: https://github.com/Riverside-Healthcare/djLint
rev: v1.23.1
hooks:
- id: djlint-django
args: ["--reformat"]

View file

@ -11,13 +11,13 @@
{% block link %} {% block link %}
<link rel="icon" <link rel="icon"
href="{% static 'main/svg/logo.svg' %}" href="{% static 'main/svg/logo.svg' %}"
type="image/svg+xml"/> type="image/svg+xml" />
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'main/css/main.css' %}" href="{% static 'main/css/main.css' %}"
type="text/css"/> type="text/css" />
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'main/fontawesome/css/all.min.css' %}" href="{% static 'main/fontawesome/css/all.min.css' %}"
type="text/css"/> type="text/css" />
{% endblock %} {% endblock %}
</head> </head>
<body> <body>
@ -36,9 +36,7 @@
<li> <li>
<a href="{% url 'index' %}" <a href="{% url 'index' %}"
class="home{% if request.resolver_match.url_name == 'index' %} cur{% endif %}" class="home{% if request.resolver_match.url_name == 'index' %} cur{% endif %}"
accesskey="h"> accesskey="h">{% translate "Home" %}</a>
{% translate "Home" %}
</a>
</li> </li>
<li> <li>
<a href="{% url 'snapshots' %}" <a href="{% url 'snapshots' %}"
@ -55,37 +53,27 @@
<li> <li>
<a href="{% url 'account' %}" <a href="{% url 'account' %}"
class="{% if request.resolver_match.url_name == 'account' %}cur{% endif %}" class="{% if request.resolver_match.url_name == 'account' %}cur{% endif %}"
accesskey="a"> accesskey="a">{% translate "New account" %}</a>
{% translate "New account" %}
</a>
</li> </li>
<li> <li>
<a href="{% url 'snapshot' %}" <a href="{% url 'snapshot' %}"
class="{% if request.resolver_match.url_name == 'snapshot' %}cur{% endif %}" class="{% if request.resolver_match.url_name == 'snapshot' %}cur{% endif %}"
accesskey="s"> accesskey="s">{% translate "New snapshot" %}</a>
{% translate "New snapshot" %}
</a>
</li> </li>
<li> <li>
<a href="{% url 'category' %}" <a href="{% url 'category' %}"
class="{% if request.resolver_match.url_name == 'category' %}cur{% endif %}" class="{% if request.resolver_match.url_name == 'category' %}cur{% endif %}"
accesskey="c"> accesskey="c">{% translate "New category" %}</a>
{% translate "New category" %}
</a>
</li> </li>
<li> <li>
<a href="{% url 'transaction' %}" <a href="{% url 'transaction' %}"
class="{% if request.resolver_match.url_name == 'transaction' %}cur{% endif %}" class="{% if request.resolver_match.url_name == 'transaction' %}cur{% endif %}"
accesskey="t"> accesskey="t">{% translate "New transaction" %}</a>
{% translate "New transaction" %}
</a>
</li> </li>
<li> <li>
<a href="{% url 'search' %}" <a href="{% url 'search' %}"
class="{% if request.resolver_match.url_name == 'search' %}cur{% endif %}" class="{% if request.resolver_match.url_name == 'search' %}cur{% endif %}"
accesskey="r"> accesskey="r">{% translate "Search" %}</a>
{% translate "Search" %}
</a>
</li> </li>
<li> <li>
<a href="{% url 'logout' %}" accesskey="l">{% translate "Log out" %}</a> <a href="{% url 'logout' %}" accesskey="l">{% translate "Log out" %}</a>

View file

@ -6,10 +6,10 @@
{{ block.super }} {{ block.super }}
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'main/css/form.css' %}" href="{% static 'main/css/form.css' %}"
type="text/css"/> type="text/css" />
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'main/css/table.css' %}" href="{% static 'main/css/table.css' %}"
type="text/css"/> type="text/css" />
{% endblock %} {% endblock %}
{% block body %} {% block body %}
{% spaceless %} {% spaceless %}

View file

@ -7,13 +7,13 @@
{{ block.super }} {{ block.super }}
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'main/css/form.css' %}" href="{% static 'main/css/form.css' %}"
type="text/css"/> type="text/css" />
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'main/css/table.css' %}" href="{% static 'main/css/table.css' %}"
type="text/css"/> type="text/css" />
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'main/css/plot.css' %}" href="{% static 'main/css/plot.css' %}"
type="text/css"/> type="text/css" />
{% endblock %} {% endblock %}
{% block body %} {% block body %}
<h1> <h1>

View file

@ -7,13 +7,13 @@
{{ block.super }} {{ block.super }}
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'main/css/form.css' %}" href="{% static 'main/css/form.css' %}"
type="text/css"/> type="text/css" />
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'main/css/table.css' %}" href="{% static 'main/css/table.css' %}"
type="text/css"/> type="text/css" />
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'main/css/plot.css' %}" href="{% static 'main/css/plot.css' %}"
type="text/css"/> type="text/css" />
{% endblock %} {% endblock %}
{% block body %} {% block body %}
<h1> <h1>

View file

@ -7,10 +7,10 @@
{{ block.super }} {{ block.super }}
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'main/css/form.css' %}" href="{% static 'main/css/form.css' %}"
type="text/css"/> type="text/css" />
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'main/css/table.css' %}" href="{% static 'main/css/table.css' %}"
type="text/css"/> type="text/css" />
{% endblock %} {% endblock %}
{% block body %} {% block body %}
<h1>{{ form.instance }}</h1> <h1>{{ form.instance }}</h1>

View file

@ -7,13 +7,13 @@
{{ block.super }} {{ block.super }}
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'main/css/form.css' %}" href="{% static 'main/css/form.css' %}"
type="text/css"/> type="text/css" />
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'main/css/table.css' %}" href="{% static 'main/css/table.css' %}"
type="text/css"/> type="text/css" />
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'main/css/plot.css' %}" href="{% static 'main/css/plot.css' %}"
type="text/css"/> type="text/css" />
{% endblock %} {% endblock %}
{% block body %} {% block body %}
{% with snapshot=form.instance %} {% with snapshot=form.instance %}

View file

@ -7,10 +7,10 @@
{{ block.super }} {{ block.super }}
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'main/css/form.css' %}" href="{% static 'main/css/form.css' %}"
type="text/css"/> type="text/css" />
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'main/css/table.css' %}" href="{% static 'main/css/table.css' %}"
type="text/css"/> type="text/css" />
{% endblock %} {% endblock %}
{% block body %} {% block body %}
<h1>{{ form.instance }}</h1> <h1>{{ form.instance }}</h1>

View file

@ -6,13 +6,13 @@
{{ block.super }} {{ block.super }}
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'main/css/index.css' %}" href="{% static 'main/css/index.css' %}"
type="text/css"/> type="text/css" />
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'main/css/table.css' %}" href="{% static 'main/css/table.css' %}"
type="text/css"/> type="text/css" />
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'main/css/plot.css' %}" href="{% static 'main/css/plot.css' %}"
type="text/css"/> type="text/css" />
{% endblock %} {% endblock %}
{% block body %} {% block body %}
{% if accounts %} {% if accounts %}

View file

@ -11,10 +11,10 @@
{{ block.super }} {{ block.super }}
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'main/css/table.css' %}" href="{% static 'main/css/table.css' %}"
type="text/css"/> type="text/css" />
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'main/css/page.css' %}" href="{% static 'main/css/page.css' %}"
type="text/css"/> type="text/css" />
{% endblock %} {% endblock %}
{% block body %} {% block body %}
<h1>{% translate "Statements" %}</h1> <h1>{% translate "Statements" %}</h1>

View file

@ -14,10 +14,10 @@
{{ block.super }} {{ block.super }}
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'main/css/table.css' %}" href="{% static 'main/css/table.css' %}"
type="text/css"/> type="text/css" />
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'main/css/page.css' %}" href="{% static 'main/css/page.css' %}"
type="text/css"/> type="text/css" />
{% endblock %} {% endblock %}
{% block body %} {% block body %}
<h1>{% translate "Transactions" %}</h1> <h1>{% translate "Transactions" %}</h1>

View file

@ -5,10 +5,10 @@
{{ block.super }} {{ block.super }}
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'main/css/table.css' %}" href="{% static 'main/css/table.css' %}"
type="text/css"/> type="text/css" />
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'main/css/form.css' %}" href="{% static 'main/css/form.css' %}"
type="text/css"/> type="text/css" />
{% endblock %} {% endblock %}
{% block body %} {% block body %}
<h1>{% translate "Log In" %}</h1> <h1>{% translate "Log In" %}</h1>

View file

@ -9,10 +9,10 @@
{{ block.super }} {{ block.super }}
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'main/css/form.css' %}" href="{% static 'main/css/form.css' %}"
type="text/css"/> type="text/css" />
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'main/css/table.css' %}" href="{% static 'main/css/table.css' %}"
type="text/css"/> type="text/css" />
{% endblock %} {% endblock %}
{% block body %} {% block body %}
<h1>{% translate "Search" %}</h1> <h1>{% translate "Search" %}</h1>