From 80bad240e72a73207c0723c149e787cfc29d8874 Mon Sep 17 00:00:00 2001 From: Herculino Trotta Date: Mon, 27 Jan 2025 13:25:47 -0300 Subject: [PATCH] refactor: remove custom_date filter --- .../calendar_view/fragments/list_transactions.html | 3 +-- app/templates/cotton/transaction/item.html | 3 +-- app/templates/dca/fragments/strategy/details.html | 7 +++---- app/templates/exchange_rates/fragments/table.html | 3 +-- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/app/templates/calendar_view/fragments/list_transactions.html b/app/templates/calendar_view/fragments/list_transactions.html index 669e3d6..ba1bd65 100644 --- a/app/templates/calendar_view/fragments/list_transactions.html +++ b/app/templates/calendar_view/fragments/list_transactions.html @@ -1,9 +1,8 @@ {% extends 'extends/offcanvas.html' %} -{% load date %} {% load i18n %} {% load crispy_forms_tags %} -{% block title %}{% translate 'Transactions on' %} {{ date|custom_date:request.user }}{% endblock %} +{% block title %}{% translate 'Transactions on' %} {{ date|date:"SHORT_DATE_FORMAT" }}{% endblock %} {% block body %}
diff --git a/app/templates/cotton/transaction/item.html b/app/templates/cotton/transaction/item.html index db12eb5..02ba143 100644 --- a/app/templates/cotton/transaction/item.html +++ b/app/templates/cotton/transaction/item.html @@ -1,4 +1,3 @@ -{% load date %} {% load i18n %}
{% if not disable_selection %} @@ -27,7 +26,7 @@ {# Date#}
-
{{ transaction.date|custom_date:request.user }} • {{ transaction.reference_date|date:"b/Y" }}
+
{{ transaction.date|date:"SHORT_DATE_FORMAT" }} • {{ transaction.reference_date|date:"b/Y" }}
{# Description#}
diff --git a/app/templates/dca/fragments/strategy/details.html b/app/templates/dca/fragments/strategy/details.html index 3e2a6dd..0db0e7c 100644 --- a/app/templates/dca/fragments/strategy/details.html +++ b/app/templates/dca/fragments/strategy/details.html @@ -1,4 +1,3 @@ -{% load date %} {% load currency_display %} {% load i18n %}
@@ -17,7 +16,7 @@ :prefix="strategy.payment_currency.prefix" :suffix="strategy.payment_currency.suffix" :decimal_places="strategy.payment_currency.decimal_places"> - • {{ strategy.current_price.1|custom_date:request.user }} + • {{ strategy.current_price.1|date:"SHORT_DATETIME_FORMAT" }} {% else %}
{% trans "No exchange rate available" %}
@@ -84,7 +83,7 @@ _="install prompt_swal">
- {{ entry.date|custom_date:request.user }} + {{ entry.date|date:"SHORT_DATE_FORMAT" }} @@ -40,7 +39,7 @@ _="install prompt_swal">
- {{ exchange_rate.date|custom_date:request.user }} + {{ exchange_rate.date|date:"SHORT_DATETIME_FORMAT" }} {{ exchange_rate.from_currency.code }} x {{ exchange_rate.to_currency.code }} 1 {{ exchange_rate.from_currency.code }} ≅ {% currency_display amount=exchange_rate.rate prefix=exchange_rate.to_currency.prefix suffix=exchange_rate.to_currency.suffix decimal_places=exchange_rate.to_currency.decimal_places%}