def delete(id):
    del_servce = Services.find_one({"_id": ObjectId(id)})
    if del_servce is not None:
        Services.delete_one(del_servce)
        return redirect('/all-service')
    else:
        print("Not found")
示例#2
0
def delete(id):
    delete_person = Services.find_one({"_id": ObjectId(id)})
    Services.delete_one(delete_person)
    return redirect('/all-service')