make_li template tag added
This commit is contained in:
parent
ed13ed2b11
commit
56f4c3c79f
0
printaform/formaprint/templatetags/__init__.py
Normal file
0
printaform/formaprint/templatetags/__init__.py
Normal file
12
printaform/formaprint/templatetags/random.py
Normal file
12
printaform/formaprint/templatetags/random.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
from django import template
|
||||
|
||||
register = template.Library()
|
||||
|
||||
def make_li(value):
|
||||
lines = value.split("\n")
|
||||
ret = ''
|
||||
for l in lines:
|
||||
ret += "<li>%s</li>" % l
|
||||
return ret
|
||||
|
||||
register.filter("make_li", make_li)
|
Loading…
Reference in New Issue
Block a user