1. 程式人生 > >django RESTful API

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,問題就會解決