From 708a434b5dcc46d1a0473e24515e3772f7ac77c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Tue, 7 Feb 2023 17:13:06 +0800 Subject: [PATCH] Renamed the append_next, inherit_next, and or_next template filters to accounting_append_next, accounting_inherit_next, and accounting_or_next, to avoid name conflict. --- src/accounting/templates/accounting/account/detail.html | 8 ++++---- src/accounting/templates/accounting/account/edit.html | 2 +- src/accounting/templates/accounting/account/list.html | 6 +++--- src/accounting/templates/accounting/account/order.html | 2 +- .../templates/accounting/base-account/detail.html | 4 ++-- .../templates/accounting/base-account/list.html | 2 +- src/accounting/templates/accounting/currency/detail.html | 6 +++--- src/accounting/templates/accounting/currency/edit.html | 2 +- src/accounting/templates/accounting/currency/list.html | 6 +++--- src/accounting/utils/next_url.py | 6 +++--- 10 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/accounting/templates/accounting/account/detail.html b/src/accounting/templates/accounting/account/detail.html index 99b79fe..376b4f5 100644 --- a/src/accounting/templates/accounting/account/detail.html +++ b/src/accounting/templates/accounting/account/detail.html @@ -26,17 +26,17 @@ First written: 2023/1/31 {% block content %}
- + {{ A_("Back") }} {% if can_edit_accounting() %} - + {{ A_("Settings") }} {% endif %} - + {{ A_("Order") }} @@ -50,7 +50,7 @@ First written: 2023/1/31 {% if can_edit_accounting() %} diff --git a/src/accounting/templates/accounting/account/edit.html b/src/accounting/templates/accounting/account/edit.html index 15514b2..1abf9a4 100644 --- a/src/accounting/templates/accounting/account/edit.html +++ b/src/accounting/templates/accounting/account/edit.html @@ -23,6 +23,6 @@ First written: 2023/2/1 {% block header %}{% block title %}{{ A_("%(account)s Settings", account=account) }}{% endblock %}{% endblock %} -{% block back_url %}{{ url_for("accounting.account.detail", account=account)|inherit_next }}{% endblock %} +{% block back_url %}{{ url_for("accounting.account.detail", account=account)|accounting_inherit_next }}{% endblock %} {% block action_url %}{{ url_for("accounting.account.update", account=account) }}{% endblock %} diff --git a/src/accounting/templates/accounting/account/list.html b/src/accounting/templates/accounting/account/list.html index 724581a..4626b35 100644 --- a/src/accounting/templates/accounting/account/list.html +++ b/src/accounting/templates/accounting/account/list.html @@ -27,7 +27,7 @@ First written: 2023/1/30
{% if can_edit_accounting() %} - + {{ A_("New") }} @@ -45,7 +45,7 @@ First written: 2023/1/30 {% if can_edit_accounting() %} @@ -56,7 +56,7 @@ First written: 2023/1/30
{% for item in list %} - + {{ item }} {% if item.is_offset_needed %} {{ A_("Offset needed") }} diff --git a/src/accounting/templates/accounting/account/order.html b/src/accounting/templates/accounting/account/order.html index c480b84..06ca248 100644 --- a/src/accounting/templates/accounting/account/order.html +++ b/src/accounting/templates/accounting/account/order.html @@ -31,7 +31,7 @@ First written: 2023/2/2 {% block content %}
- + {{ A_("Back") }} diff --git a/src/accounting/templates/accounting/base-account/detail.html b/src/accounting/templates/accounting/base-account/detail.html index 16da523..5c0f8d4 100644 --- a/src/accounting/templates/accounting/base-account/detail.html +++ b/src/accounting/templates/accounting/base-account/detail.html @@ -26,7 +26,7 @@ First written: 2023/2/1 {% block content %}
- + {{ A_("Back") }} @@ -38,7 +38,7 @@ First written: 2023/2/1 {% if obj.accounts %}
{% for account in obj.accounts %} - + {{ account }} {% endfor %} diff --git a/src/accounting/templates/accounting/base-account/list.html b/src/accounting/templates/accounting/base-account/list.html index 4b82ae1..89e034a 100644 --- a/src/accounting/templates/accounting/base-account/list.html +++ b/src/accounting/templates/accounting/base-account/list.html @@ -42,7 +42,7 @@ First written: 2023/1/26
{% for item in list %} - + {{ item }} {% endfor %} diff --git a/src/accounting/templates/accounting/currency/detail.html b/src/accounting/templates/accounting/currency/detail.html index 25dbbde..4580b45 100644 --- a/src/accounting/templates/accounting/currency/detail.html +++ b/src/accounting/templates/accounting/currency/detail.html @@ -26,12 +26,12 @@ First written: 2023/2/6 {% block content %}
- + {{ A_("Back") }} {% if can_edit_accounting() %} - + {{ A_("Settings") }} @@ -46,7 +46,7 @@ First written: 2023/2/6 {% if can_edit_accounting() %} diff --git a/src/accounting/templates/accounting/currency/edit.html b/src/accounting/templates/accounting/currency/edit.html index 05a231a..7b31b5f 100644 --- a/src/accounting/templates/accounting/currency/edit.html +++ b/src/accounting/templates/accounting/currency/edit.html @@ -23,7 +23,7 @@ First written: 2023/2/6 {% block header %}{% block title %}{{ A_("%(currency)s Settings", currency=currency) }}{% endblock %}{% endblock %} -{% block back_url %}{{ url_for("accounting.currency.detail", currency=currency)|inherit_next }}{% endblock %} +{% block back_url %}{{ url_for("accounting.currency.detail", currency=currency)|accounting_inherit_next }}{% endblock %} {% block action_url %}{{ url_for("accounting.currency.update", currency=currency) }}{% endblock %} diff --git a/src/accounting/templates/accounting/currency/list.html b/src/accounting/templates/accounting/currency/list.html index 57e12d5..b1df0b3 100644 --- a/src/accounting/templates/accounting/currency/list.html +++ b/src/accounting/templates/accounting/currency/list.html @@ -27,7 +27,7 @@ First written: 2023/2/6
{% if can_edit_accounting() %} - + {{ A_("New") }} @@ -45,7 +45,7 @@ First written: 2023/2/6 {% if can_edit_accounting() %} @@ -56,7 +56,7 @@ First written: 2023/2/6
{% for item in list %} - + {{ item }} {% endfor %} diff --git a/src/accounting/utils/next_url.py b/src/accounting/utils/next_url.py index fcd3a77..d2cffaa 100644 --- a/src/accounting/utils/next_url.py +++ b/src/accounting/utils/next_url.py @@ -81,6 +81,6 @@ def init_app(bp: Blueprint) -> None: :param bp: The blueprint of the accounting application. :return: None. """ - bp.add_app_template_filter(append_next, "append_next") - bp.add_app_template_filter(inherit_next, "inherit_next") - bp.add_app_template_filter(or_next, "or_next") + bp.add_app_template_filter(append_next, "accounting_append_next") + bp.add_app_template_filter(inherit_next, "accounting_inherit_next") + bp.add_app_template_filter(or_next, "accounting_or_next")