From 698c8966c0e87b8aaddc3b35860826817b0774ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Wed, 11 Sep 2024 11:40:17 +0200 Subject: [PATCH] add purchase date to game view --- games/views/game.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/games/views/game.py b/games/views/game.py index 2d5ef34..e0b6c26 100644 --- a/games/views/game.py +++ b/games/views/game.py @@ -229,11 +229,12 @@ def view_game(request: HttpRequest, game_id: int) -> HttpResponse: } purchase_data: dict[str, Any] = { - "columns": ["Name", "Type", "Price", "Actions"], + "columns": ["Name", "Type", "Date", "Price", "Actions"], "rows": [ [ purchase.name if purchase.name else purchase.edition.name, purchase.get_type_display(), + purchase.date_purchased.strftime(dateformat), f"{purchase.price} {purchase.price_currency}", render_to_string( "cotton/button_group.html",