django delete record from table code example
Example 1: delete model object django
SomeModel.objects.filter(id=id).delete()
Example 2: delete database entry using name django
obj = get_object_or_404(modelname, name=name)
obj.delete()
SomeModel.objects.filter(id=id).delete()
obj = get_object_or_404(modelname, name=name)
obj.delete()