示例#1
0
    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)
示例#2
0
    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)
示例#3
0
    def render_template(self, template_name, **contexts):
        contexts['council'] = {'user': self.authenticated}

        return BaseController.render_template(self, template_name, **contexts)
示例#4
0
 def __init__(self, *args, **kwargs):
     BaseController.__init__(self, *args, **kwargs)
     super(Mixin, self).__init__()
示例#5
0
    def render_template(self, template_name, **contexts):
        contexts['council'] = {
            'user': self.authenticated
        }

        return BaseController.render_template(self, template_name, **contexts)
示例#6
0
 def __init__(self, *args, **kwargs):
     BaseController.__init__(self, *args, **kwargs)
     super(Mixin, self).__init__()