django RESTful API

Got AttributeError when attempting to get a value for field `code` on serializer `SnippetSerializer`.
The serializer field might be named incorrectly and not match any attribute or key on the `UserInfo` instance.
Original exception text was: 'UserInfo' object has no attribute 'codet'

django中的字段参数TextField如果不加参数就会报出类似的错,加入,blank = True,问题就会解决

posted on 2018-12-30 15:42  小石潭记  阅读(203)  评论(0编辑  收藏  举报

导航