hello i have a rest_framework project and this is the problem :
and this is code (serializer and function in views.py)
why username is like that?
CodePudding user response:
maybe you are getting these values from some form so it's a BoundField object. You can use .value()
while assigning the values to related fields in User()
Object.
CodePudding user response:
this code is fine. problem is in your html template. you are sending the whole html element in post