3👍
✅
You should implement the __str__
method to decide how to render the objects (Diagnosis
in this case):
class Diagnosis(models.Model):
diagnosis=models.CharField(max_length=30, blank=True)
def __str__(self):
return self.diagnosis
Source:stackexchange.com