3
0
Fork 0
mirror of https://github.com/nanoy42/coope synced 2024-12-27 09:23:47 +00:00
coope/django_tex/filters.py
2019-01-06 15:57:02 +01:00

9 lines
No EOL
194 B
Python

from django.utils.formats import localize_input
def do_linebreaks(value):
return value.replace('\n', '\\\\\n')
FILTERS = {
'localize': localize_input,
'linebreaks': do_linebreaks
}