summaryrefslogtreecommitdiff
path: root/saleor/product/templatetags/sort_by.py
diff options
context:
space:
mode:
authormichal <michal.sipa@mirumee.com>2017-10-06 14:22:50 +0200
committermichal <michal.sipa@mirumee.com>2017-10-06 14:22:50 +0200
commit0ba195f2efdacb674c8ff7affbea353abbe2a936 (patch)
tree28ea4f3afb583e5f44a202a779aa655b8f1d19ce /saleor/product/templatetags/sort_by.py
parent0d11f7d0285b2dca7c7539049d01eafd8da6b99e (diff)
downloadsaleor-frontend-0ba195f2efdacb674c8ff7affbea353abbe2a936.tar.gz
saleor-frontend-0ba195f2efdacb674c8ff7affbea353abbe2a936.tar.bz2
saleor-frontend-0ba195f2efdacb674c8ff7affbea353abbe2a936.zip
Further refactoring of sort_by and sort_menu
Combine sort_by and sort_menu to one template and templatetag. Move templatetags to shop.py. Delete sort_menu.py and _sort_menu.html. Update index.html with new templatetags.
Diffstat (limited to 'saleor/product/templatetags/sort_by.py')
-rw-r--r--saleor/product/templatetags/sort_by.py11
1 files changed, 0 insertions, 11 deletions
diff --git a/saleor/product/templatetags/sort_by.py b/saleor/product/templatetags/sort_by.py
deleted file mode 100644
index 58395c07..00000000
--- a/saleor/product/templatetags/sort_by.py
+++ /dev/null
@@ -1,11 +0,0 @@
-from django import template
-
-register = template.Library()
-
-
-@register.inclusion_tag('category/_sort_by.html', takes_context=True)
-def sort_by(context, attribute):
- return {'request': context['request'],
- 'label': attribute['label'],
- 'ascending_attribute': attribute['value'],
- 'descending_attribute': '-' + str(attribute['value'])}