object on delete django code example
Example 1: delete model object django
SomeModel.objects.filter(id=id).delete()
Example 2: create django object
Author.objects.create(name="Joe")
SomeModel.objects.filter(id=id).delete()
Author.objects.create(name="Joe")