diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ef37d38..52b1cf1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -108,6 +108,11 @@ curlylint: script: - curlylint . +djhtml: + <<: *python_test_template + script: + - git ls-files '*.html' | xargs djhtml --check --tabwidth 2 + prettier: <<: *node_test_template script: diff --git a/justfile b/justfile index 15f46ac..dad9849 100644 --- a/justfile +++ b/justfile @@ -28,6 +28,7 @@ test *ARGS: format: black . isort . + git ls-files '*.html' | xargs djhtml -i --tabwidth 2 npm run format lint: lint_python lint_node @@ -38,6 +39,7 @@ lint_python: flake8 mypy . --show-error-codes curlylint . + git ls-files '*.html' | xargs djhtml --check --tabwidth 2 @lint_node: npm run lint diff --git a/requirements/dev.in b/requirements/dev.in index 3fad42e..f92244c 100644 --- a/requirements/dev.in +++ b/requirements/dev.in @@ -11,3 +11,4 @@ django-debug-toolbar types-requests mypy curlylint +djhtml diff --git a/requirements/dev.txt b/requirements/dev.txt index d8a83b5..5478d58 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -30,6 +30,7 @@ django-rq==2.5.1 # via -r requirements/base.txt django-taggit==2.1.0 # via -r requirements/base.txt, wagtail django-treebeard==4.5.1 # via -r requirements/base.txt, wagtail djangorestframework==3.13.1 # via -r requirements/base.txt, wagtail +djhtml==1.5.1 # via -r requirements/dev.in draftjs-exporter==2.1.7 # via -r requirements/base.txt, wagtail et-xmlfile==1.1.0 # via -r requirements/base.txt, openpyxl flake8==4.0.1 # via -r requirements/dev.in diff --git a/templates/500.html b/templates/500.html index 65b5416..74beed6 100644 --- a/templates/500.html +++ b/templates/500.html @@ -1,12 +1,12 @@ - - -Internal server error - - - -

Internal server error

-

Sorry, there seems to be an error. Please try again soon.

- + + + Internal server error + + + +

Internal server error

+

Sorry, there seems to be an error. Please try again soon.

+ diff --git a/templates/base.html b/templates/base.html index c8aae3a..c1193d2 100644 --- a/templates/base.html +++ b/templates/base.html @@ -25,7 +25,7 @@ {% wagtailuserbar %} {% cache 3600 "navbar" %} - {% navbar %} + {% navbar %} {% endcache %} {% block main %} @@ -35,7 +35,7 @@ {% endblock %} {% cache 3600 "footer" %} - {% footer %} + {% footer %} {% endcache %}