From f089892c90e0d86f5aa365d6698f590a867bf3b2 Mon Sep 17 00:00:00 2001 From: PCoder Date: Fri, 10 Apr 2020 20:02:12 +0530 Subject: [PATCH] Remove duplicated html + add href link to order --- datacenterlight/templatetags/custom_tags.py | 4 ++-- hosting/templates/hosting/invoices.html | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/datacenterlight/templatetags/custom_tags.py b/datacenterlight/templatetags/custom_tags.py index 9727d9a7..d064e285 100644 --- a/datacenterlight/templatetags/custom_tags.py +++ b/datacenterlight/templatetags/custom_tags.py @@ -2,7 +2,7 @@ import datetime import logging from django import template -from django.core.urlresolvers import resolve, reverse +from django.core.urlresolvers import resolve, reverse, reverse_lazy from django.utils.safestring import mark_safe from django.utils.translation import activate, get_language, ugettext_lazy as _ @@ -85,7 +85,7 @@ def get_line_item_from_hosting_order_charge(hosting_order_id): product_name=hosting_order.generic_product.product_name.capitalize(), created_at=hosting_order.created_at.strftime('%Y-%m-%d'), total='%.2f' % (hosting_order.price), - receipt_url="test", + receipt_url=reverse_lazy('hosting:login', hosting_order.id), see_invoice_text=_("See Invoice") )) else: diff --git a/hosting/templates/hosting/invoices.html b/hosting/templates/hosting/invoices.html index ca7ab66e..32ec8004 100644 --- a/hosting/templates/hosting/invoices.html +++ b/hosting/templates/hosting/invoices.html @@ -86,12 +86,6 @@ {% for ho, stripe_charge_data in invs_charge %} - {{ho.generic_product.product_name}} - {{ho.created_at}} - {{ho.price}} - - {% trans "See Invoice" %} - {{ ho.id | get_line_item_from_hosting_order_charge }} {% endfor %}