From 406f2b8d782c779354ecfc8488d4ed849e3ae665 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Wed, 27 Apr 2022 23:20:10 +0200 Subject: [PATCH] Add basket date in list --- src/purchase/templates/purchase/basket_list.html | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/purchase/templates/purchase/basket_list.html b/src/purchase/templates/purchase/basket_list.html index 1c68bfb..f80048d 100644 --- a/src/purchase/templates/purchase/basket_list.html +++ b/src/purchase/templates/purchase/basket_list.html @@ -3,7 +3,7 @@ {% load purchase %} {% block content %}

{% translate "Baskets" %}

-
+
{% for basket in baskets %}
@@ -12,7 +12,13 @@

{% blocktranslate count counter=basket.items.count %}1 item{% plural %}{{ counter }} items{% endblocktranslate %}
{{ basket.price|currency }}
- {{ basket.payment_method|default:"-" }} + {{ basket.payment_method|default:"-" }}
+ {% now "Y-m-d" as todays_date %} + {% if basket.created_at|date:"Y-m-d" == todays_date %} + {{ basket.created_at|date:"TIME_FORMAT" }} + {% else %} + {{ basket.created_at }} + {% endif %}

{% if perms.purchase.change_basket %}