summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormahesh2017-05-17 19:01:11 +0530
committermahesh2017-05-17 19:01:11 +0530
commit153f738c3c43b26339fb625aba8336b3f8265991 (patch)
treeb861180e74f8a03e9c509a2c26a1030eb42c5e13
parentb591928d868ecf92660e43be72348334073ed502 (diff)
downloadonline_test-153f738c3c43b26339fb625aba8336b3f8265991.tar.gz
online_test-153f738c3c43b26339fb625aba8336b3f8265991.tar.bz2
online_test-153f738c3c43b26339fb625aba8336b3f8265991.zip
adds zip_longest function for python 2 in custom_filters,py
-rw-r--r--yaksh/templatetags/custom_filters.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/yaksh/templatetags/custom_filters.py b/yaksh/templatetags/custom_filters.py
index 693dc2b..df6ecce 100644
--- a/yaksh/templatetags/custom_filters.py
+++ b/yaksh/templatetags/custom_filters.py
@@ -1,6 +1,9 @@
from django import template
from django.template.defaultfilters import stringfilter
-from itertools import zip_longest
+try:
+ from itertools import zip_longest
+except ImportError:
+ from itertools import izip_longest as zip_longest
register = template.Library()