Beispiel #1
0
 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)
Beispiel #2
0
 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!")