Ejemplo n.º 1
0
 def post(self, *args, **kwargs):
     account = self.get_argument('account')
     passw1 = self.get_argument('passw')
     passw2 = self.get_argument('rpassw')
     if passw2.strip() != passw1.strip():
         self.redirect('regist_fail')
     else:
         account = account.strip()
         passw = passw1.strip()
         try:
             save_new_user(account,passw)
         except IntegrityError as e:
             self.redirect('regist_fail')
     self.render('regist_success.html')
     pass
Ejemplo n.º 2
0
 def post(self, *args, **kwargs):
     account = self.get_argument('account')
     passw1 = self.get_argument('passw')
     passw2 = self.get_argument('rpassw')
     if passw2.strip() != passw1.strip():
         self.redirect('regist_fail')
     else:
         account = account.strip()
         passw = passw1.strip()
         try:
             save_new_user(account, passw)
         except IntegrityError as e:
             self.redirect('regist_fail')
     self.render('regist_success.html')
     pass
Ejemplo n.º 3
0
 def test_save_new_user(self):
     try:
         save_new_user('18810541263', '0603')
     except:
         pass
Ejemplo n.º 4
0
 def test_save_new_user(self):
     try:
         save_new_user('18810541263','0603')
     except:
         pass