tables
This commit is contained in:
commit
1b7664311f
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
|
||||
from django.utils.safestring import mark_safe
|
||||
register = template.Library()
|
||||
|
||||
def make_li(value):
|
||||
lines = value.split("\n")
|
||||
ret = ''
|
||||
for l in lines:
|
||||
ret += "<li>%s</li>" % l
|
||||
return mark_safe(ret)
|
||||
|
||||
register.filter("make_li", make_li)
|
Loading…
Reference in New Issue
Block a user