def delete_category(cls): _id = input("id: ") result, err = Category.delete(_id) if result: print(f"Successfully deleted category with _id: {_id}") else: print(err)
def del_category(cls): print("------ delete category -----") _id = input("please enter your id for delete Category: ") if not _id: print("you forget enter id!") elif Category.delete(_id): print(f"category {_id} delete successfully") else: print(f"sorry,category {_id} not found!")