def _context_loader(): if len(_mappings_pool_) > 0 and config.run_mode is not 'debug': web.ctx.mapping = _mappings_pool_.pop() else: web.ctx.mapping = UrlMapping('/', config.url_config[1]) from portal.model import cur_pm cur_pm()
def __auto__(self): self.pm = cur_pm() self.auth = Auth() gest = self.auth.user() if not gest: self.auth.user('1') render('common_header')