diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6fa14369..c2cb0d5c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,3 +27,9 @@ jobs: - name: Run Biome run: biome ci . + + - name: Install djhtml + run: pip install djhtml + + - name: Run djhtml + run: djhtml pgcommitfest/*/templates/*.html --tabwidth=1 --check diff --git a/Makefile b/Makefile index 2a9ad3a9..4950827f 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ format: ruff format npx @biomejs/biome format --write + djhtml pgcommitfest/*/templates/*.html --tabwidth=1 lint: ruff check diff --git a/dev_requirements.txt b/dev_requirements.txt index 66d7ae13..2b0518b5 100644 --- a/dev_requirements.txt +++ b/dev_requirements.txt @@ -2,3 +2,4 @@ uwsgi pycodestyle ruff +djhtml diff --git a/pgcommitfest/commitfest/templates/404.html b/pgcommitfest/commitfest/templates/404.html index ccf5146c..73a24c02 100644 --- a/pgcommitfest/commitfest/templates/404.html +++ b/pgcommitfest/commitfest/templates/404.html @@ -1,7 +1,7 @@ {%extends "base.html" %} {%block title%}Not found{%endblock%} {%block contents%} -

Not found

-

The specified URL was not found.

+

Not found

+

The specified URL was not found.

{%endblock%} diff --git a/pgcommitfest/commitfest/templates/activity.html b/pgcommitfest/commitfest/templates/activity.html index 1d5a060f..621155ee 100644 --- a/pgcommitfest/commitfest/templates/activity.html +++ b/pgcommitfest/commitfest/templates/activity.html @@ -2,25 +2,25 @@ {%load commitfest %} {%block contents%} - - - - - - - - - - -{%for a in activity %} - - - - - - -{%endfor%} - -
TimeUserPatchActivity
{{a.date}}{{a.by}}{{a.name}}{{a.what}}
+ + + + + + + + + + + {%for a in activity %} + + + + + + + {%endfor%} + +
TimeUserPatchActivity
{{a.date}}{{a.by}}{{a.name}}{{a.what}}
{%endblock%} diff --git a/pgcommitfest/commitfest/templates/base.html b/pgcommitfest/commitfest/templates/base.html index 382c43bc..4e564908 100644 --- a/pgcommitfest/commitfest/templates/base.html +++ b/pgcommitfest/commitfest/templates/base.html @@ -1,48 +1,48 @@ {%load commitfest%} - + {{title}} -{%block extrahead%}{%endblock%} -{%if rss_alternate%} {%endif%} - - -
- + {%block extrahead%}{%endblock%} + {%if rss_alternate%} {%endif%} + + +
+ -

{{title}}

+

{{title}}

-{%if messages%} - {%for m in messages%} -
{{m}}
- {%endfor%} -{%endif%} + {%if messages%} + {%for m in messages%} +
{{m}}
+ {%endfor%} + {%endif%} -{%block contents%} -{%endblock%} -
- - - - -{%block morescript%}{%endblock%} - + {%block contents%} + {%endblock%} +
+ + + + + {%block morescript%}{%endblock%} + diff --git a/pgcommitfest/commitfest/templates/base_form.html b/pgcommitfest/commitfest/templates/base_form.html index 3bfaca85..1facd506 100644 --- a/pgcommitfest/commitfest/templates/base_form.html +++ b/pgcommitfest/commitfest/templates/base_form.html @@ -2,113 +2,113 @@ {%load commitfest%} {%block contents%} -
{%csrf_token%} -{%if form.errors%} -
Please correct the errors below, and re-submit the form.
-{%endif%} -{%if form.non_field_errors%} -
{{form.non_field_errors}}
-{%endif%} -{%if note%} -
{{note|safe}}
-{%endif%} - {%for field in form%} - {%if not field.is_hidden%} -
- {{field|label_class:"control-label col-lg-1"}} -
- {%if field.errors %} - {%for e in field.errors%} -
{{e}}
- {%endfor%} + {%csrf_token%} + {%if form.errors%} +
Please correct the errors below, and re-submit the form.
{%endif%} -{%if not field.name in form.selectize_multiple_fields%}{{field|field_class:"form-control"}}{%else%}{{field}}{%endif%} -{%if field.help_text%}
{{field.help_text|safe}}{%endif%}
-
- {%else%} -{{field}} - {%endif%} -{%endfor%} -
-
-
+ {%if form.non_field_errors%} +
{{form.non_field_errors}}
+ {%endif%} + {%if note%} +
{{note|safe}}
+ {%endif%} + {%for field in form%} + {%if not field.is_hidden%} +
+ {{field|label_class:"control-label col-lg-1"}} +
+ {%if field.errors %} + {%for e in field.errors%} +
{{e}}
+ {%endfor%} + {%endif%} + {%if not field.name in form.selectize_multiple_fields%}{{field|field_class:"form-control"}}{%else%}{{field}}{%endif%} + {%if field.help_text%}
{{field.help_text|safe}}{%endif%}
+
+ {%else%} + {{field}} + {%endif%} + {%endfor%} +
+
+
+
-
- + -{%if threadbrowse %} -{%include "thread_attach.inc" %} -{%endif%} + {%if threadbrowse %} + {%include "thread_attach.inc" %} + {%endif%} -{%if user.is_staff%} -