update model in django 3 code example
Example 1: str django
def __str__(self):
return self.name
Example 2: django pk
pk stands the "primary key" in django which represents a models ID.
The ID attribute is generated for you automatically behind the scences
for each model and any newly created instances after that.