user_image
By  烫头的罗本    On   2019年10月4日 21:24

查看其它API时,运行 >>> Question.objects.all()出现报错: Traceback (most recent call last): File "<console>", line 1, in <module> File "D:\python\Python36\lib\site-packages\django\db\models\query.py", line 247, in __repr__ return '<%s %r>' % (self.__class__.__name__, data) File "D:\python\Python36\lib\site-packages\django\db\models\base.py", line 503, in __repr__ return '<%s: %s>' % (self.__class__.__name__, self) File "E:\python项目\mysite\polls\models.py", line 9, in __str__ return self.question_text AttributeError: 'Question' object has no attribute 'question_text' 重新配置了一次还是这样,什么原因呢?愁