django model get object by id code example
Example 1: delete model object django
SomeModel.objects.filter(id=id).delete()
Example 2: django get item by id
obj = Class.objects.get(pk=this_object_id)
SomeModel.objects.filter(id=id).delete()
obj = Class.objects.get(pk=this_object_id)