[Fixed]-Admin site attribute error

1👍

class Response(models.Model):
        request = models.ForeignKey(Request)
        response_text = models.CharField(max_length=200)
        # pub_date = models.DateTimeField("time of response")
        votes = models.IntegerField(default=0)

        def __str__(self):
            return self.response

This class hasn’t self.response. Only request, response_text and votes. You need return other value.

👤JRazor

Leave a comment