diff --git a/shop/templates/order_detail.html b/shop/templates/order_detail.html index 84048a20..6d9b72d6 100644 --- a/shop/templates/order_detail.html +++ b/shop/templates/order_detail.html @@ -1,5 +1,6 @@ {% extends 'base.html' %} {% load bootstrap3 %} +{% load shop_tags %} {% block content %} @@ -42,9 +43,9 @@ {{ order_product.quantity }} {% endif %}
diff --git a/shop/templatetags/__init__.py b/shop/templatetags/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/shop/templatetags/shop_tags.py b/shop/templatetags/shop_tags.py new file mode 100644 index 00000000..2aa6b95f --- /dev/null +++ b/shop/templatetags/shop_tags.py @@ -0,0 +1,10 @@ +from django import template + +register = template.Library() + + +@register.filter +def currency(value): + return "{0:.2f} DKK".format(value) + +