1๐
โ
You can simply add __str__
method [doc] to your UserMadeAccount
model
def __str__(self):
return self.field_name
The str() method is called whenever you call str() on an object.
Django uses str(obj) in a number of places. Most notably, to display
an object in the Django admin site and as the value inserted into a
template when it displays an object. Thus, you should always return a
nice, human-readable representation of the model from the str()
method.
๐คSumithran
Source:stackexchange.com