Example #1
0
class UserAdd(RHandler):
    def __init__(self, application, request):
        RHandler.__init__(self, application, request)
        self.userDao = UserDao()

    def get(self):
        self.userDao.save({})
        self.write("add success!")
Example #2
0
class UserDelete(RHandler):
    def __init__(self, application, request):
        RHandler.__init__(self, application, request)
        self.userDao = UserDao()

    def get(self):
        user_id = self.get_argument("id", None)
        self.userDao.deleteByid(user_id)
        self.write("delete success!")
Example #3
0
class UserPageQuery(RHandler):
    def __init__(self, application, request):
        RHandler.__init__(self, application, request)
        self.userDao = UserDao()

    def get(self):
        user_id = self.get_argument("user_id", None)
        user = self.userDao.findByid(user_id)
        self.render("userDetail.html", user=user)
Example #4
0
 def __init__(self, application, request):
     RHandler.__init__(self, application, request)
     self.userDao = UserDao()