linotp.flap module

class linotp.flap.RequestContextProxy

Bases: object

get(name, default=None)
items()
setdefault(key, value)
class linotp.flap.RequestProxy(proxy)

Bases: object

Flask request object plus params -> args

property params
exception linotp.flap.TemplateError(template)

Bases: RuntimeError

linotp.flap.render_mako(template_name, extra_context=None)

This is loosely compatible with the Pylons render_mako() function, so we don’t need to change all the occurrences of this function elsewhere in the code. We try to avoid making all global variables available to Mako for replacement; in fact most templates only refer to the c variable, and we pass any additional ones in the extra_context parameter. Of course we still have all the stuff that Flask pushes into the template context, and eventually the templates may be rewritten to use that.

linotp.flap.set_config()

Set up config from flask request object

linotp.flap.setup_mako(app)