diff --git a/src/purchase/templates/purchase/basket_list.html b/src/purchase/templates/purchase/basket_list.html index ffe053e..61d196d 100644 --- a/src/purchase/templates/purchase/basket_list.html +++ b/src/purchase/templates/purchase/basket_list.html @@ -10,7 +10,7 @@
- {% blocktranslate count counter=basket.items.count %}1 item{% plural %}{{ counter }} items{% endblocktranslate %}
+ {% blocktranslate count counter=basket.articles_count %}1 item{% plural %}{{ counter }} items{% endblocktranslate %}
{{ basket.price|currency }}
{{ basket.payment_method|default:"-" }}
{% now "Y-m-d" as todays_date %}
diff --git a/src/purchase/views/basket.py b/src/purchase/views/basket.py
index f03b45c..0cd04cc 100644
--- a/src/purchase/views/basket.py
+++ b/src/purchase/views/basket.py
@@ -101,7 +101,7 @@ def additional_unpriced_product(request: WSGIRequest) -> HttpResponse:
@permission_required("purchase.view_basket")
@condition(etag_func=reports_etag, last_modified_func=reports_last_modified)
def list_baskets(request: WSGIRequest) -> HttpResponse:
- context = {"baskets": Basket.objects.priced().order_by("-id")}
+ context = {"baskets": Basket.objects.with_articles_count().priced().order_by("-id")}
return render(request, "purchase/basket_list.html", context)