tostring returns bytes...

This commit is contained in:
j 2017-02-16 14:27:20 +01:00
parent 12f3901c9a
commit b800110b29

View file

@ -83,7 +83,7 @@ def opensearch_xml(request):
e.attrib['template'] = "%s?q={searchTerms}" % request.build_absolute_uri('/opensearch_suggest')
'''
return HttpResponse(
'<?xml version="1.0" encoding="UTF-8"?>\n' + ET.tostring(osd),
'<?xml version="1.0" encoding="UTF-8"?>\n' + ET.tostring(osd).decode(),
'application/xml'
)