def __before__(self): BaseController.__before__(self) # logged in... c.username = session.get('user', None) if not c.username or not session.get('mod',None): redirect(url('/flickr/login'))
def __before__(self): BaseController.__before__(self) # logged in... c.username = session['user'] if not session['mod']: redirect(url('/ping/index'))