コード例 #1
0
ファイル: login.py プロジェクト: fluidinfo/Tickery
 def onRemoteResponse(self, result, request_info):
     if result['result']:
         URL = result['URL']
         Window.setLocation(URL)
     else:
         self.sender.setWidget(
             0, 1, Label('Could not get login redirect URL: ' +
                         result['error']))
コード例 #2
0
 def onRemoteResponse(self, response, requestInfo):
     self.errorInfoLabel.setText('')
     d = datetime.date.today() + datetime.timedelta(days=1)
     setCookie("LoggedInUser", response, d, path='/')
     loggedInUser = json.loads(response)
     if loggedInUser["is_superuser"] == True:
         Window.setLocation("/admin.html")
     else:
         Window.setLocation("/home.html")
コード例 #3
0
 def onRemoteResponse(self, response, requestInfo):
     Window.setLocation("/home.html")
コード例 #4
0
 def onRemoteResponse(self, response, requestInfo):
     self.errorlabel.setText('')
     Window.alert("Signed up successfully. Please login.")
     Window.setLocation("/index.html")