-
Notifications
You must be signed in to change notification settings - Fork 663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to update extended user profile? #51
Comments
+1 for supporting extended user profiles! |
@Omnipresent
and then update Your solution will not work because you can update only UserProfile id assigned to User, not fields from UserProfile. |
@jmorrice You can write your custom serializer to do that. |
@jmorrice @Omnipresent I added new position in FAQ, should be helpful for both of you http://django-rest-auth.readthedocs.org/en/latest/faq.html (point #2) |
@mateusz-sikora I've seen your solution while looking for somthing similar for myself, and tried to come up with somthing a bit more general which doesn't make you add each field seperatly throughout the code. Came up with this -
|
@Idanraman do you have this code within a github codebase so that i can understand it fully. For example what is UserDetailsSerializer? |
|
I had a need to store additional information for the user. So I created a UserProfile model by adding this in my
models.py
Further I made a
serializers.py
file in my application and added the following to it so that whenever the user is created aUserProfile
could be created as well and whenever a user is updated thecompany_name
field would be updated as well.However, the changes I made to serializers.py don't seem to be having any effect.
How would I go about updating the
company_name
field when the user profile is updated on this urlhttp://localhost:8080/rest-auth/user/
? FYI, I'm trying all this in the demo application that ships with application.The text was updated successfully, but these errors were encountered: