update model in djanog code example
Example 1: str django
def __str__(self):
return self.name
Example 2: django delete object
SomeModel.objects.filter(id=id).delete()
def __str__(self):
return self.name
SomeModel.objects.filter(id=id).delete()