comparison odfcast/convert.py @ 59:2dacbe7fb7f9

Fix returning html formatted error response
author Björn Ricks <bjoern.ricks@intevation.de>
date Wed, 12 Nov 2014 12:38:37 +0100
parents ea839127934d
children ae377f7eed18
comparison
equal deleted inserted replaced
58:ea839127934d 59:2dacbe7fb7f9
47 "error_code": error_code, 47 "error_code": error_code,
48 "details": details, 48 "details": details,
49 }), JSON_MIMETYPE 49 }), JSON_MIMETYPE
50 50
51 def html(self, title, error_code, details): 51 def html(self, title, error_code, details):
52 data = "" 52 data = (
53 return (
54 u'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">\n' 53 u'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">\n'
55 u'<title>%(code)s %(name)s</title>\n' 54 u'<title>%(code)s %(name)s</title>\n'
56 u'<h1>%(name)s</h1>\n' 55 u'<h1>%(name)s</h1>\n'
57 u'%(details)s\n' 56 u'%(details)s\n'
58 ) % { 57 ) % {
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)