FIX: normalize newlines in exported event list.
This commit is contained in:
@@ -11,6 +11,7 @@ from django.http import HttpResponse, HttpResponseRedirect
|
|||||||
from django.shortcuts import get_object_or_404
|
from django.shortcuts import get_object_or_404
|
||||||
from django.urls import reverse, reverse_lazy
|
from django.urls import reverse, reverse_lazy
|
||||||
from django.utils.decorators import method_decorator
|
from django.utils.decorators import method_decorator
|
||||||
|
from django.utils.text import normalize_newlines
|
||||||
from django.utils.translation import ugettext as _
|
from django.utils.translation import ugettext as _
|
||||||
from django.views import generic
|
from django.views import generic
|
||||||
|
|
||||||
@@ -96,9 +97,10 @@ class EventListExportView(generic.FormView):
|
|||||||
if event.deadline < deadline:
|
if event.deadline < deadline:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
txt += event.render_as_text(format='ka-alpin')
|
txt += normalize_newlines(event.render_as_text(format='ka-alpin'))
|
||||||
if event.internal_note:
|
if event.internal_note:
|
||||||
txt += u'\n> Bearbeitungshinweis:\n> ' + event.internal_note.replace('\n', '\n> ') + u'\n'
|
txt += u'\n> Bearbeitungshinweis:\n> '
|
||||||
|
txt += normalize_newlines(event.internal_note).replace('\n', '\n> ') + u'\n'
|
||||||
txt += u'\n' + (u'-' * 72) + '\n\n'
|
txt += u'\n' + (u'-' * 72) + '\n\n'
|
||||||
|
|
||||||
filename += u'.txt'
|
filename += u'.txt'
|
||||||
|
|||||||
Reference in New Issue
Block a user