diff --git a/datacenterlight/templatetags/custom_tags.py b/datacenterlight/templatetags/custom_tags.py index 900d94aa..9727d9a7 100644 --- a/datacenterlight/templatetags/custom_tags.py +++ b/datacenterlight/templatetags/custom_tags.py @@ -63,8 +63,8 @@ def escaped_line_break(value): return value.replace("\\n", "\n") -@register.simple_tag -def get_line_item_from_hosting_order_charge(hosting_order_id, receipt_url): +@register.filter('get_line_item_from_hosting_order_charge') +def get_line_item_from_hosting_order_charge(hosting_order_id): """ Returns ready-to-use "html" line item to be shown for a charge in the invoice list page @@ -85,7 +85,7 @@ def get_line_item_from_hosting_order_charge(hosting_order_id, receipt_url): 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=receipt_url, + receipt_url="test", see_invoice_text=_("See Invoice") )) else: diff --git a/hosting/templates/hosting/invoices.html b/hosting/templates/hosting/invoices.html index 6c8394f0..0a565969 100644 --- a/hosting/templates/hosting/invoices.html +++ b/hosting/templates/hosting/invoices.html @@ -1,5 +1,5 @@ {% extends "hosting/base_short.html" %} -{% load staticfiles bootstrap3 humanize i18n custom_tags get_line_item_from_hosting_order_charge %} +{% load staticfiles bootstrap3 humanize i18n custom_tags %} {% block content %}