django update model

SomeModel.objects.filter(id=id).delete()

Here is what the above code is Doing:
1. We’re using the Django ORM to query the database for all objects with an id of id.
2. We’re using the Django ORM to delete all objects with an id of id.

The above code will delete all objects with an id of id from the database.

If you want to delete a single object, you can use the following code:

SomeModel.objects.get(id=id).delete()

The above code will delete the object with an id of id from the database.