// post [python]
    def post(self):
        if (request.environ['CONTENT_TYPE'].split(';', 1)[0] == "application/json"):
            try:
                para = request.get_json()
            except Exception as e:
                resp = make_response(("The json data can't be parsed", 403, ))
                return resp
                
            account = para['account']
            password = para['password']
            nickname = para['nickname']
            email = para['email']
            if not all((account, password, nickname, email)):
                return make_response(("Missing important data in the request", 400, ))
            tmp_re = re.compile(tmp_str)
            if (len(account) > 50) or not tmp_re.match(account):
                return make_response(("The account {0} is illegal".format(account), 400, ))
            if (len(password) > 50) or not tmp_re.match(password):
                return make_response(("The password {0} is illegal".format(password), 400, ))
            if len(nickname) > 50:
                return make_response(("The nickname {0} exceed the maximum length".format(nickname), 400, ))
            if (len(email) > 100) or (len(email.split('@')) != 2):
                return make_response(("The email {0} is unacceptable".format(nickname), 400, ))
            db_session = get_session()
            try:
                db_user = db_session.query(UserInfo).filter_by(username = account).one()
            except Exception, e:
                user = UserInfo(account, email, nickname)
                auth = UserAuth(account, password)
                db_session.begin()
                try:
                    db_session.add(user)
                    db_session.add(auth)
                    db_session.commit()
                except:
                    db_session.rollback()
                    return ("DataBase Failed", 503, )
                tmp = rpc_callbacks()
                RPC.register_callbacks(user.username, [tmp])
                queue = RPC.create_queue(user.username, user.username)
                cnn = RPC.create_connection()
                RPC.create_consumer(user.username, cnn, queue)
                RPC.release_consumer(user.username)
                RPC.release_connection(cnn)
                resp = Response("Account is created successfully", 201, )
                return resp
            else:
                if not db_user.deleted:
                    return make_response(("The account {0} is already existed".format(account), 400, ))
                else:
                    auth = db_session.query(UserAuth).filter(UserAuth.account == db_user.username).first()
                    if len(auth) < 1:
                        return make_response(("The account {0} is already existed".format(account), 400, ))
                    if auth.is_authenticated(password):
                        db_session.begin()
                        try:
                            auth.activate()
                            db_user.deleted = False
                            db_session.add(db_user)
                            db_session.commit()
                        except:
                            db_session.rollback()
                            return ("DataBase Failed", 503, )
                        RPC.create_queue(db_user.username, db_user.username)
                        resp = Response("Account is recoveried successfully", 200, {'token':auth.token})
                        return resp
                    else:
                        return make_response(("The account {0} is already existed".format(account), 400, ))
        else:
            return make_response(("Please upload a json data", 403, ))