Hi,
In *ModelViewSet *we can use following code to change my serializer 
according my method here ,
def get_serializer_class(self):
   if self.action == 'list':
        return MovieRatingSerializer
   else:
        return self.serializer_class

But can in ListCreateAPIView, i cannot use the same logic, self.action 
cannot found and shows the errors. Is it possible to use this same logic 
(two serializer in one class based on different method) in other generics 
functions?

Regards,
Saifullah Shahen

-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-rest-framework+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-rest-framework/1d5ece29-5b89-47db-8aae-4c3fd13b1d32n%40googlegroups.com.

Reply via email to