from django import template register = template.Library() @register.filter def nsep(lst): return "\n".join(lst)