def post(self): username = self.request.get('username') password = self.request.get('password') u = User.login(username, password) if u: self.login(u) self.redirect('/blog/welcome/?') else: msg = 'Invalid login' self.render('login-form.html', error=msg)
def post(self): username = self.request.get('username') password = self.request.get('password') u = User.login(username, password) if u: self.login(u) self.redirect('/blog/welcome/?') else: msg = 'Invalid login' self.render('login-form.html', error = msg)
def post(self): username = self.request.get('username') password = self.request.get('password') u = User.login(username, password) if u: self.login(u) self.redirect('/') else: msg = 'Invalid login' self.params['msg'] = msg self.render('login-form.html')
def post(self): username = self.request.get('username') password = self.request.get('password') self.next_url = str(self.request.get('next_url')) if not self.next_url or self.next_url.startswith('/login'): self.next_url = '/' u = User.login(username, password) if u: self.login(u) self.done() else: msg = 'Invalid login' self.render('login-form.html', error = msg)