def __init__(self, ctx): # Convert paths and ids to utf-8, otherwise werkzeug will break self.exports = dict(imap( lambda x: (x[0].encode('utf-8'), x[1].encode('utf-8')), self.exports.items())) IMiddleware.__init__(self, ctx) SharedDataMiddleware.__init__(self, self.application, self.exports)
def __init__(self, ctx): IMiddleware.__init__(self, ctx) self.enabled = ctx.cfg['debug']