Пример #1
0
 def is_login(self, redir = True):
     """
     s是否登陆 , 登陆状态, 返回登陆id 
     """
     if users.get_current_user() is not None:
         return users.get_current_user()
     else:
         if redir == True :
             redirect(users.create_login_url())
         else:
             return False
Пример #2
0
 def get_user(self):
     return users.get_current_user()