bottle-debugtoolbar
makes an assumption that Content-type
response header is set.
Just set the response content-type using bottle.response:
from bottle import response
...
@bottle.route('/')
def index():
response.headers['Content-Type'] = 'text/html; charset=UTF-8'
...
UPD:
Here's a simple working example:
import bottle
from bottle_debugtoolbar import DebugToolbarPlugin
from bottle import response
config = {
'DEBUG_TB_ENABLED': True,
'DEBUG_TB_INTERCEPT_REDIRECTS': True,
}
plugin = DebugToolbarPlugin(config)
bottle.install(plugin)
@bottle.route('/')
def guestbook_index():
response.headers['Content-Type'] = 'text/html; charset=UTF-8'
return '<html><body>Hello, world</body></html>'
bottle.debug(True)
bottle.run(host='localhost', port=8082)
Hope that helps.