From 8443e03b1ffaa603540f483e117ed22efa65bcb2 Mon Sep 17 00:00:00 2001 From: PCoder Date: Tue, 7 Apr 2020 19:33:13 +0530 Subject: [PATCH] Add ho values --- hosting/templates/hosting/invoices.html | 4 ++-- hosting/views.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hosting/templates/hosting/invoices.html b/hosting/templates/hosting/invoices.html index 3386d09c..ca7ab66e 100644 --- a/hosting/templates/hosting/invoices.html +++ b/hosting/templates/hosting/invoices.html @@ -86,8 +86,8 @@ {% for ho, stripe_charge_data in invs_charge %} - {{ho.generic_product.product_name.capitalize()}} - {{ho.created_at.strftime('%Y-%m-%d')}} + {{ho.generic_product.product_name}} + {{ho.created_at}} {{ho.price}} {% trans "See Invoice" %} diff --git a/hosting/views.py b/hosting/views.py index eac81d66..96bff53b 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -1344,6 +1344,8 @@ class InvoiceListView(LoginRequiredMixin, TemplateView): ) stripe_chgs = [] for ho in hosting_orders: + ho.generic_product.product_name = ho.generic_product.product_name.capitalize() + ho.created = ho.created.strftime('%Y-%m-%d') stripe_chgs.append( {ho: stripe.Charge.retrieve(ho.stripe_charge_id)}) paginator_charges = Paginator(stripe_chgs, 10)