diff --git a/.djlintrc b/.djlintrc new file mode 100644 index 000000000..460601f39 --- /dev/null +++ b/.djlintrc @@ -0,0 +1,3 @@ +{ + "ignore": "T002,T003,H005,H006,H023,H029,H030,H031" +} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c38cc8890..e8833c9f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,9 +16,13 @@ jobs: node-version: '16' cache: 'yarn' - - uses: pre-commit/action@v3.0.0 - - uses: pre-commit-ci/lite-action@v1.0.1 + - name: Install dependencies + run: | + pip install django==4.2.4 + sudo apt-get update && sudo apt-get install -y gettext + yarn install + - uses: pre-commit/action@v3.0.0 test: runs-on: ubuntu-latest strategy: diff --git a/fragdenstaat_de/fds_cms/templates/cms/base.html b/fragdenstaat_de/fds_cms/templates/cms/base.html index 9afc6c541..57a289f53 100644 --- a/fragdenstaat_de/fds_cms/templates/cms/base.html +++ b/fragdenstaat_de/fds_cms/templates/cms/base.html @@ -12,7 +12,7 @@ {% include "account/includes/impostor.html" %} {% endif %} {% block top_block %} - +
{% static_placeholder "top_banner" %}
{% endblock %} {% block navbar %} {% include "header.html" %} diff --git a/fragdenstaat_de/fds_cms/templates/cms/pub_base.html b/fragdenstaat_de/fds_cms/templates/cms/pub_base.html index 2c2d2137f..0e80bb9d2 100644 --- a/fragdenstaat_de/fds_cms/templates/cms/pub_base.html +++ b/fragdenstaat_de/fds_cms/templates/cms/pub_base.html @@ -47,9 +47,11 @@
+ {# djlint:off H021 #}
    {% show_menu 1 100 0 1 %}
+ {# djlint:on #}
@@ -58,8 +60,7 @@ {% if not request.current_page.soft_root and request.current_page.in_navigation %}
+ class="sticky-top z-2 toc bg-body-secondary my-3 mx-0 mx-md-3 p-3 small">
{% endif %}
diff --git a/fragdenstaat_de/fds_cms/templates/fds_cms/card/card_image.html b/fragdenstaat_de/fds_cms/templates/fds_cms/card/card_image.html index 9018de38f..954007620 100644 --- a/fragdenstaat_de/fds_cms/templates/fds_cms/card/card_image.html +++ b/fragdenstaat_de/fds_cms/templates/fds_cms/card/card_image.html @@ -19,6 +19,9 @@ {% endwith %} {% if instance.link %} - {% else %} + {# djlint:off H025 #} + + {# djlint:on #} + {% else %}
{% endif %} diff --git a/fragdenstaat_de/fds_donation/templates/fds_donation/donor_detail.html b/fragdenstaat_de/fds_donation/templates/fds_donation/donor_detail.html index dd3cd93ce..21118c739 100644 --- a/fragdenstaat_de/fds_donation/templates/fds_donation/donor_detail.html +++ b/fragdenstaat_de/fds_donation/templates/fds_donation/donor_detail.html @@ -50,7 +50,7 @@

Vielen Dank für Ihre Spende!

{% if donation.received_timestamp %}Bestätigt{% endif %} {% endif %} - + {% endfor %} diff --git a/fragdenstaat_de/fds_donation/templates/fds_donation/forms/donation.html b/fragdenstaat_de/fds_donation/templates/fds_donation/forms/donation.html index 2abcc49d6..01856b987 100644 --- a/fragdenstaat_de/fds_donation/templates/fds_donation/forms/donation.html +++ b/fragdenstaat_de/fds_donation/templates/fds_donation/forms/donation.html @@ -3,7 +3,6 @@ {% block title %} {% trans "Donation" %} {% endblock title %} - {% block top_block %}{% endblock %} {% block navbar %} {% include "header_minimal.html" %} diff --git a/fragdenstaat_de/fds_donation/templates/fds_donation/forms/widgets/amount_input.html b/fragdenstaat_de/fds_donation/templates/fds_donation/forms/widgets/amount_input.html index 307dc4cd1..c69db5ee3 100644 --- a/fragdenstaat_de/fds_donation/templates/fds_donation/forms/widgets/amount_input.html +++ b/fragdenstaat_de/fds_donation/templates/fds_donation/forms/widgets/amount_input.html @@ -17,7 +17,9 @@ {% endif %} + {# djlint:off H021 #}
+ {# djlint:on #} {% include "django/forms/widgets/text.html" %} {{ currency }}
diff --git a/fragdenstaat_de/fds_mailing/templates/email/default/action.html b/fragdenstaat_de/fds_mailing/templates/email/default/action.html index ebde30204..c0c6caa73 100644 --- a/fragdenstaat_de/fds_mailing/templates/email/default/action.html +++ b/fragdenstaat_de/fds_mailing/templates/email/default/action.html @@ -1,3 +1,4 @@ +{# djlint:off H021 #} {% if heading %} diff --git a/fragdenstaat_de/fds_mailing/templates/email/default/base.html b/fragdenstaat_de/fds_mailing/templates/email/default/base.html index 30fc8c9b6..6530b19aa 100644 --- a/fragdenstaat_de/fds_mailing/templates/email/default/base.html +++ b/fragdenstaat_de/fds_mailing/templates/email/default/base.html @@ -1,3 +1,4 @@ +{# djlint:off H021 #} diff --git a/fragdenstaat_de/fds_mailing/templates/email/default/section.html b/fragdenstaat_de/fds_mailing/templates/email/default/section.html index 059ebbecb..2001f2ba9 100644 --- a/fragdenstaat_de/fds_mailing/templates/email/default/section.html +++ b/fragdenstaat_de/fds_mailing/templates/email/default/section.html @@ -1,3 +1,4 @@ +{# djlint:off H021 #}
diff --git a/fragdenstaat_de/fds_mailing/templates/email/default/story.html b/fragdenstaat_de/fds_mailing/templates/email/default/story.html index 3d3433152..9f4dcdcad 100644 --- a/fragdenstaat_de/fds_mailing/templates/email/default/story.html +++ b/fragdenstaat_de/fds_mailing/templates/email/default/story.html @@ -1,3 +1,4 @@ +{# djlint:off H021 #}
@@ -16,3 +17,4 @@

{{ heading }}


+{# djlint:on #} diff --git a/fragdenstaat_de/fds_mailing/templates/fds_mailing/render_base.html b/fragdenstaat_de/fds_mailing/templates/fds_mailing/render_base.html index c0df46182..930ff06a6 100644 --- a/fragdenstaat_de/fds_mailing/templates/fds_mailing/render_base.html +++ b/fragdenstaat_de/fds_mailing/templates/fds_mailing/render_base.html @@ -1,3 +1,4 @@ +{# djlint:off H021 #} {% extends object.get_template %} {% load cms_tags %} {% block body %} diff --git a/fragdenstaat_de/fds_newsletter/templates/fds_newsletter/plugins/smart_newsletter_form.html b/fragdenstaat_de/fds_newsletter/templates/fds_newsletter/plugins/smart_newsletter_form.html index edd7e6856..4f6f9c7f5 100644 --- a/fragdenstaat_de/fds_newsletter/templates/fds_newsletter/plugins/smart_newsletter_form.html +++ b/fragdenstaat_de/fds_newsletter/templates/fds_newsletter/plugins/smart_newsletter_form.html @@ -30,10 +30,12 @@

{{ newsletter.title }}

{% elif has_newsletter and fallback %}

Unterstützen Sie FragDenStaat!

+ {# djlint:off D018 #} Jetzt spenden + {# djlint:on #}
{% endif %} diff --git a/fragdenstaat_de/fds_ogimage/templates/fds_ogimage/foirequest.html b/fragdenstaat_de/fds_ogimage/templates/fds_ogimage/foirequest.html index 0a00527dc..3fcc7a70b 100644 --- a/fragdenstaat_de/fds_ogimage/templates/fds_ogimage/foirequest.html +++ b/fragdenstaat_de/fds_ogimage/templates/fds_ogimage/foirequest.html @@ -1,3 +1,4 @@ +{# djlint:off H021 #} {% extends "fds_ogimage/base.html" %} {% load humanize %} {% block title %}{{ object.title }}{% endblock %} diff --git a/fragdenstaat_de/fds_ogimage/templates/fds_ogimage/govplan_section.html b/fragdenstaat_de/fds_ogimage/templates/fds_ogimage/govplan_section.html index 805d4a058..17f598395 100644 --- a/fragdenstaat_de/fds_ogimage/templates/fds_ogimage/govplan_section.html +++ b/fragdenstaat_de/fds_ogimage/templates/fds_ogimage/govplan_section.html @@ -1,3 +1,4 @@ +{# djlint:off H021 #} {% extends "fds_ogimage/govplan_plan.html" %} {% load govplan %} {% block tagline %}Themenbereich {{ object.title }}{% endblock %} @@ -17,3 +18,4 @@
{% endblock %} +{# djlint:on #} diff --git a/fragdenstaat_de/templates/account/admin_send_mail.html b/fragdenstaat_de/templates/account/admin_send_mail.html index 4d816b8ea..5567afcf8 100644 --- a/fragdenstaat_de/templates/account/admin_send_mail.html +++ b/fragdenstaat_de/templates/account/admin_send_mail.html @@ -14,23 +14,24 @@ +

+

+ +

+ + + {% if select_across %} + + {# set invalid selected, so confirmation action path is chosen in admin #} + + {% else %} + {% for obj in queryset %} + + {% endfor %} + {% endif %} + +{% endblock %} diff --git a/fragdenstaat_de/templates/account/new_terms.html b/fragdenstaat_de/templates/account/new_terms.html index 971e60b6b..49f794c35 100644 --- a/fragdenstaat_de/templates/account/new_terms.html +++ b/fragdenstaat_de/templates/account/new_terms.html @@ -1,7 +1,7 @@ {% extends 'account/new_terms.html' %} {% block terms_details %}

- Unsere Nutzungsbedingungen wurden von iRights.Law komplett überarbeitet und verständlicher gemacht. + Unsere Nutzungsbedingungen wurden von iRights.Law komplett überarbeitet und verständlicher gemacht.

Folgendes ist besser geworden:

    diff --git a/fragdenstaat_de/templates/account/settings.html b/fragdenstaat_de/templates/account/settings.html index cee042b21..515d1cea0 100644 --- a/fragdenstaat_de/templates/account/settings.html +++ b/fragdenstaat_de/templates/account/settings.html @@ -1,3 +1,4 @@ +{# djlint:off D018 #} {% extends "account/settings.html" %} {% load fax_tags %} {% load newsletter_tags %} @@ -22,3 +23,4 @@ {% newsletter_settings %} {% include "froide_fax/_signature_form.html" with form=request.user|get_signature_form next=request.get_full_path %} {% endblock %} +{# djlint:on #} diff --git a/fragdenstaat_de/templates/campaign/food/request_banner.html b/fragdenstaat_de/templates/campaign/food/request_banner.html index de863c401..228849ddc 100644 --- a/fragdenstaat_de/templates/campaign/food/request_banner.html +++ b/fragdenstaat_de/templates/campaign/food/request_banner.html @@ -4,11 +4,13 @@
    + {# djlint:off D018 #} Topf Secret + {# djlint:off #}
    {% if campaign.description %}{{ campaign.description|markdown }}{% endif %} diff --git a/fragdenstaat_de/templates/djangocms_audio/default/file.html b/fragdenstaat_de/templates/djangocms_audio/default/file.html index 3359122d8..ad14c44df 100644 --- a/fragdenstaat_de/templates/djangocms_audio/default/file.html +++ b/fragdenstaat_de/templates/djangocms_audio/default/file.html @@ -28,8 +28,10 @@
    + {# djlint:off H021 #}
    00:00 / 00:00
    + {# djlint:on #}