Home > Back-end >  problem while registering user in db django rest framework
problem while registering user in db django rest framework

Time:08-18

hello i have a rest_framework project and this is the problem : enter image description here

and this is code (serializer and function in views.py)

enter image description here

enter image description here

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

  • Related