This commit is contained in:
Raphael Michel
2021-11-30 22:52:34 +01:00
parent 97e12c5003
commit 83b5a325e3

View File

@@ -24,6 +24,8 @@ from django import template
register = template.Library()
@register.simple_tag
@register.filter
def oneline(value):
return ', '.join([l.strip() for l in value.splitlines() if l and l.strip()])
if not value:
return ''
return ', '.join([l.strip() for l in str(value).splitlines() if l and l.strip()])