make_li dont li if blank

This commit is contained in:
Sanj 2011-11-16 18:51:15 +05:30
parent 2c0d236b1c
commit 42d395aa7e

View File

@ -6,7 +6,8 @@ def make_li(value):
lines = value.split("\n") lines = value.split("\n")
ret = '' ret = ''
for l in lines: for l in lines:
ret += "<li>%s</li>" % l if l.strip() != '':
ret += "<li>%s</li>" % l
return mark_safe(ret) return mark_safe(ret)
register.filter("make_li", make_li) register.filter("make_li", make_li)