diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 34ecda0..e97183d 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -8,3 +8,8 @@ repos:
     rev: 23.3.0
     hooks:
       - id: black
+  - repo: https://github.com/Riverside-Healthcare/djLint
+    rev: v1.23.1
+    hooks:
+      - id: djlint-django
+        args: ["--reformat"]
diff --git a/nummi/main/templates/main/base.html b/nummi/main/templates/main/base.html
index b5eee2b..befb11f 100644
--- a/nummi/main/templates/main/base.html
+++ b/nummi/main/templates/main/base.html
@@ -11,13 +11,13 @@
         {% block link %}
             <link rel="icon"
                   href="{% static 'main/svg/logo.svg' %}"
-                  type="image/svg+xml"/>
+                  type="image/svg+xml" />
             <link rel="stylesheet"
                   href="{% static 'main/css/main.css' %}"
-                  type="text/css"/>
+                  type="text/css" />
             <link rel="stylesheet"
                   href="{% static 'main/fontawesome/css/all.min.css' %}"
-                  type="text/css"/>
+                  type="text/css" />
         {% endblock %}
     </head>
     <body>
@@ -36,9 +36,7 @@
                             <li>
                                 <a href="{% url 'index' %}"
                                    class="home{% if request.resolver_match.url_name == 'index' %} cur{% endif %}"
-                                   accesskey="h">
-                                    {% translate "Home" %}
-                                </a>
+                                   accesskey="h">{% translate "Home" %}</a>
                             </li>
                             <li>
                                 <a href="{% url 'snapshots' %}"
@@ -55,37 +53,27 @@
                             <li>
                                 <a href="{% url 'account' %}"
                                    class="{% if request.resolver_match.url_name == 'account' %}cur{% endif %}"
-                                   accesskey="a">
-                                    {% translate "New account" %}
-                                </a>
+                                   accesskey="a">{% translate "New account" %}</a>
                             </li>
                             <li>
                                 <a href="{% url 'snapshot' %}"
                                    class="{% if request.resolver_match.url_name == 'snapshot' %}cur{% endif %}"
-                                   accesskey="s">
-                                    {% translate "New snapshot" %}
-                                </a>
+                                   accesskey="s">{% translate "New snapshot" %}</a>
                             </li>
                             <li>
                                 <a href="{% url 'category' %}"
                                    class="{% if request.resolver_match.url_name == 'category' %}cur{% endif %}"
-                                   accesskey="c">
-                                    {% translate "New category" %}
-                                </a>
+                                   accesskey="c">{% translate "New category" %}</a>
                             </li>
                             <li>
                                 <a href="{% url 'transaction' %}"
                                    class="{% if request.resolver_match.url_name == 'transaction' %}cur{% endif %}"
-                                   accesskey="t">
-                                    {% translate "New transaction" %}
-                                </a>
+                                   accesskey="t">{% translate "New transaction" %}</a>
                             </li>
                             <li>
                                 <a href="{% url 'search' %}"
                                    class="{% if request.resolver_match.url_name == 'search' %}cur{% endif %}"
-                                   accesskey="r">
-                                    {% translate "Search" %}
-                                </a>
+                                   accesskey="r">{% translate "Search" %}</a>
                             </li>
                             <li>
                                 <a href="{% url 'logout' %}" accesskey="l">{% translate "Log out" %}</a>
diff --git a/nummi/main/templates/main/confirm_delete.html b/nummi/main/templates/main/confirm_delete.html
index da28ece..7ad791e 100644
--- a/nummi/main/templates/main/confirm_delete.html
+++ b/nummi/main/templates/main/confirm_delete.html
@@ -6,10 +6,10 @@
     {{ block.super }}
     <link rel="stylesheet"
           href="{% static 'main/css/form.css' %}"
-          type="text/css"/>
+          type="text/css" />
     <link rel="stylesheet"
           href="{% static 'main/css/table.css' %}"
-          type="text/css"/>
+          type="text/css" />
 {% endblock %}
 {% block body %}
     {% spaceless %}
diff --git a/nummi/main/templates/main/form/account.html b/nummi/main/templates/main/form/account.html
index 7967eb0..0b3bcdc 100644
--- a/nummi/main/templates/main/form/account.html
+++ b/nummi/main/templates/main/form/account.html
@@ -7,13 +7,13 @@
     {{ block.super }}
     <link rel="stylesheet"
           href="{% static 'main/css/form.css' %}"
-          type="text/css"/>
+          type="text/css" />
     <link rel="stylesheet"
           href="{% static 'main/css/table.css' %}"
-          type="text/css"/>
+          type="text/css" />
     <link rel="stylesheet"
           href="{% static 'main/css/plot.css' %}"
-          type="text/css"/>
+          type="text/css" />
 {% endblock %}
 {% block body %}
     <h1>
diff --git a/nummi/main/templates/main/form/category.html b/nummi/main/templates/main/form/category.html
index c2c1782..b6f8052 100644
--- a/nummi/main/templates/main/form/category.html
+++ b/nummi/main/templates/main/form/category.html
@@ -7,13 +7,13 @@
     {{ block.super }}
     <link rel="stylesheet"
           href="{% static 'main/css/form.css' %}"
-          type="text/css"/>
+          type="text/css" />
     <link rel="stylesheet"
           href="{% static 'main/css/table.css' %}"
-          type="text/css"/>
+          type="text/css" />
     <link rel="stylesheet"
           href="{% static 'main/css/plot.css' %}"
-          type="text/css"/>
+          type="text/css" />
 {% endblock %}
 {% block body %}
     <h1>
diff --git a/nummi/main/templates/main/form/invoice.html b/nummi/main/templates/main/form/invoice.html
index 34f925c..a0fb629 100644
--- a/nummi/main/templates/main/form/invoice.html
+++ b/nummi/main/templates/main/form/invoice.html
@@ -7,10 +7,10 @@
     {{ block.super }}
     <link rel="stylesheet"
           href="{% static 'main/css/form.css' %}"
-          type="text/css"/>
+          type="text/css" />
     <link rel="stylesheet"
           href="{% static 'main/css/table.css' %}"
-          type="text/css"/>
+          type="text/css" />
 {% endblock %}
 {% block body %}
     <h1>{{ form.instance }}</h1>
diff --git a/nummi/main/templates/main/form/snapshot.html b/nummi/main/templates/main/form/snapshot.html
index 3ecfb5b..f303fd5 100644
--- a/nummi/main/templates/main/form/snapshot.html
+++ b/nummi/main/templates/main/form/snapshot.html
@@ -7,13 +7,13 @@
     {{ block.super }}
     <link rel="stylesheet"
           href="{% static 'main/css/form.css' %}"
-          type="text/css"/>
+          type="text/css" />
     <link rel="stylesheet"
           href="{% static 'main/css/table.css' %}"
-          type="text/css"/>
+          type="text/css" />
     <link rel="stylesheet"
           href="{% static 'main/css/plot.css' %}"
-          type="text/css"/>
+          type="text/css" />
 {% endblock %}
 {% block body %}
     {% with snapshot=form.instance %}
diff --git a/nummi/main/templates/main/form/transaction.html b/nummi/main/templates/main/form/transaction.html
index 9fa3cb6..9813d40 100644
--- a/nummi/main/templates/main/form/transaction.html
+++ b/nummi/main/templates/main/form/transaction.html
@@ -7,10 +7,10 @@
     {{ block.super }}
     <link rel="stylesheet"
           href="{% static 'main/css/form.css' %}"
-          type="text/css"/>
+          type="text/css" />
     <link rel="stylesheet"
           href="{% static 'main/css/table.css' %}"
-          type="text/css"/>
+          type="text/css" />
 {% endblock %}
 {% block body %}
     <h1>{{ form.instance }}</h1>
diff --git a/nummi/main/templates/main/index.html b/nummi/main/templates/main/index.html
index 18495c5..5a108c5 100644
--- a/nummi/main/templates/main/index.html
+++ b/nummi/main/templates/main/index.html
@@ -6,13 +6,13 @@
     {{ block.super }}
     <link rel="stylesheet"
           href="{% static 'main/css/index.css' %}"
-          type="text/css"/>
+          type="text/css" />
     <link rel="stylesheet"
           href="{% static 'main/css/table.css' %}"
-          type="text/css"/>
+          type="text/css" />
     <link rel="stylesheet"
           href="{% static 'main/css/plot.css' %}"
-          type="text/css"/>
+          type="text/css" />
 {% endblock %}
 {% block body %}
     {% if accounts %}
diff --git a/nummi/main/templates/main/list/snapshot.html b/nummi/main/templates/main/list/snapshot.html
index 28c385a..f73ca0b 100644
--- a/nummi/main/templates/main/list/snapshot.html
+++ b/nummi/main/templates/main/list/snapshot.html
@@ -11,10 +11,10 @@
     {{ block.super }}
     <link rel="stylesheet"
           href="{% static 'main/css/table.css' %}"
-          type="text/css"/>
+          type="text/css" />
     <link rel="stylesheet"
           href="{% static 'main/css/page.css' %}"
-          type="text/css"/>
+          type="text/css" />
 {% endblock %}
 {% block body %}
     <h1>{% translate "Statements" %}</h1>
diff --git a/nummi/main/templates/main/list/transaction.html b/nummi/main/templates/main/list/transaction.html
index d2c6672..912e45b 100644
--- a/nummi/main/templates/main/list/transaction.html
+++ b/nummi/main/templates/main/list/transaction.html
@@ -14,10 +14,10 @@
     {{ block.super }}
     <link rel="stylesheet"
           href="{% static 'main/css/table.css' %}"
-          type="text/css"/>
+          type="text/css" />
     <link rel="stylesheet"
           href="{% static 'main/css/page.css' %}"
-          type="text/css"/>
+          type="text/css" />
 {% endblock %}
 {% block body %}
     <h1>{% translate "Transactions" %}</h1>
diff --git a/nummi/main/templates/main/login.html b/nummi/main/templates/main/login.html
index 32149b6..4ed17e4 100644
--- a/nummi/main/templates/main/login.html
+++ b/nummi/main/templates/main/login.html
@@ -5,10 +5,10 @@
     {{ block.super }}
     <link rel="stylesheet"
           href="{% static 'main/css/table.css' %}"
-          type="text/css"/>
+          type="text/css" />
     <link rel="stylesheet"
           href="{% static 'main/css/form.css' %}"
-          type="text/css"/>
+          type="text/css" />
 {% endblock %}
 {% block body %}
     <h1>{% translate "Log In" %}</h1>
diff --git a/nummi/main/templates/main/search.html b/nummi/main/templates/main/search.html
index 2baf470..0361299 100644
--- a/nummi/main/templates/main/search.html
+++ b/nummi/main/templates/main/search.html
@@ -9,10 +9,10 @@
     {{ block.super }}
     <link rel="stylesheet"
           href="{% static 'main/css/form.css' %}"
-          type="text/css"/>
+          type="text/css" />
     <link rel="stylesheet"
           href="{% static 'main/css/table.css' %}"
-          type="text/css"/>
+          type="text/css" />
 {% endblock %}
 {% block body %}
     <h1>{% translate "Search" %}</h1>
