

@tornado.gen.coroutine
def prepare(self):
    '\n        Called before every get/post invocation for this handler. We use\n        the opportunity to look up the session status, and also portlink\n        information.\n        '
    (yield self.find_current_session())
    if self.tw_load_portlink:
        portid = self.get_cookie('tworld_portlink', None)
        if portid:
            try:
                portid = ObjectId(portid)
                self.twportlink = (yield self.external_portal_description(portid))
            except Exception as ex:
                self.application.twlog.info('Unable to load portlink info for template: %s', ex)

dataset/ETHPy150Open erkyrath/tworld/lib/tweblib/handlers.py MyHandlerMixin.prepare/original