vintasoftware / drf-rw-serializers

Generic views, viewsets and mixins that extend the Django REST Framework ones adding separated serializers for read and write operations
MIT License
180 stars 28 forks source link

How to use drf-rw-serializers in viewsets.ModelViewSet #12

Closed XueWei closed 5 years ago

XueWei commented 5 years ago

Description

Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen.

What I Did

As document said: the view class is base on generics.ListCreateAPIView. and from drf_rw_serializers import generics But I am using viewsets.ModelViewSet for view class base, how could I enable drf_rw_serializers to my view class?

Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
XueWei commented 5 years ago

I took a look example, there is viewset overite implement.