def inert_user(name, password):
    user = User(name=name, password=password)
    db.add(user)
    try:
        db.commit()
    except:
        print 'error'
def do_update(id):
    user = User.query.filter(User.id == id).first()
    user.card_credit = 100
    db.commit()
def do_delete(id):
    user = User.query.filter(User.id == id).first()
    db.delete(user)
    db.commit()