[Fixed]-Displaying a foreignkey's value

1👍

You need to define the __str__ method:

class Show(models.Model):
    name = models.CharField(max_length=255, null=True, blank=True)

    def __str__(self):
        return "%s" % self.name
👤NS0

Leave a comment