progress on coverage and course export
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user