Пример #1
0
    def initialize(self, request, response):
        BaseRequestHandler.initialize(self, request, response)

        # 用户登录的标记,使用Google账号登陆
        # 这四个参数构成了 用户登录校验的全部
        self.current_user = users.get_current_user()
        self.login_url = users.create_login_url(self.request.uri)
        self.logout_url = users.create_logout_url(self.request.uri)
        self.admin_user = users.is_current_user_admin()
Пример #2
0
 def __init__(self):
     RequestHandler.__init__(self)
Пример #3
0
 def __getattribute__(self, name):
     if name in TRIGGERED_METHODS:
         self.request.method = name
         return self
     else:
         return AE_RequestHandler.__getattribute__(self, name)
Пример #4
0
 def __getattribute__(self, name):
     if name in TRIGGERED_METHODS:
         self.request.method = name
         return self
     else:
         return AE_RequestHandler.__getattribute__(self, name)
 def __init__(self, request, response):
     RequestHandler.__init__(self, request, response)
     self._initMethodList()
Пример #6
0
 def __init__(self, *args):
     RequestHandler.__init__(self, *args)
Пример #7
0
 def immediately_redirect():
     _RequestHandler.redirect(self, *args, **kwargs)