Answers for "delete database entry using name django"

7

delete model object django

SomeModel.objects.filter(id=id).delete()
Posted by: Guest on May-04-2020
4

delete database entry using name django

obj = get_object_or_404(modelname, name=name)
obj.delete()
Posted by: Guest on November-07-2020

Code answers related to "delete database entry using name django"

Python Answers by Framework

Browse Popular Code Answers by Language