Hello, how to update user profile in Angular when it is nested serializer in user model? Should i make a put request on user profile and pass some sort of table into that, or should i simply modify userProfile model.
@artempotemkin90714 жыл бұрын
ty man :)
@gabrielwong19912 жыл бұрын
Hi can you do it the other way round so User information is nested within Profile?
@SimpleUEisBetterThenComplex2 жыл бұрын
Yes. You can set it up in serializer.
@gabrielwong19912 жыл бұрын
Turns out it is tricky because Id field is nested in person.id and is throwing errors. Thanks anyway
@nHx20094 жыл бұрын
I'm doing same thing and get only persons ID in response of /api/users/
@nHx20094 жыл бұрын
fixed by adding (many=False) : class UserSerializer(serializers.ModelSerializer): person = PersonSerializer(many=False)
@damianmosinski27823 жыл бұрын
Siema we mów po polsku bo nie rozumiem . Prosze :) .