(Django) Combining auth.User tables with app.UserProfile in Django Rest Framework with Class Based Views

Viewed 658

I need to create User instances through the Django Rest API. The normal Django built-in User needs to be extended, most commonly with a UserProfile model. Because of this, User objects had to be represented with a separate table for User and UserProfile in the API.

I assume I could make a single function-based view that combines serialized data from both User and UserProfile serializers, but I'm really interested to know if it's possible to do the same thing with a class-based view. It would need to have two querysets and serializer_classes, is that even possible?

1 Answers
Related