Private
Public Access
1
0

progress on coverage and course export

This commit is contained in:
Sander Roosendaal
2019-01-08 13:37:50 +01:00
parent e0bf0e3fe7
commit 5a0f69a835
10 changed files with 2986 additions and 4 deletions

View File

@@ -2004,6 +2004,12 @@ def course_kmlemail_view(request,id=0):
kmlfilename = 'course_{id}.kml'.format(id=id)
response = HttpResponse(kmlstring)
response['Content-Disposition'] = 'attachment; filename="{filename}"'.format(filename=kmlfilename)
response['Content-Type'] = 'application/octet-stream'
return response
with codecs.open(kmlfilename,'w','utf-8') as fop:
fop.write(kmlstring)