def render(self, template_name, **contexts): contexts.update(metadata) if 'authenticated' not in contexts: contexts['authenticated'] = self.authenticated() if 'current_user' not in contexts: contexts['current_user'] = self.transformer.convert_entity_to_dict(self.user) BaseController.render(self, template_name, **contexts)
def __init__(self, *args, **kwargs): BaseController.__init__(self, *args, **kwargs) self.user = self.session('user') self.transformer = self.component('data_transformer') self.params = self.transformer.simplify(self.request.arguments)
def render_template(self, template_name, **contexts): contexts['council'] = {'user': self.authenticated} return BaseController.render_template(self, template_name, **contexts)
def __init__(self, *args, **kwargs): BaseController.__init__(self, *args, **kwargs) super(Mixin, self).__init__()
def render_template(self, template_name, **contexts): contexts['council'] = { 'user': self.authenticated } return BaseController.render_template(self, template_name, **contexts)