RealtimeMixin
rest_live.mixins.RealtimeMixin marks a Django REST Framework
Generic APIView as realtime capable. RealtimeMixin was designed to work with any subclass class of
rest_framework.generics.GenericAPIView,
like ListAPIView, RetrieveAPIView, and ModelViewSet.
These are the View properties and methods used by the RealtimeMixin:
lookup_field(defaults topkin DRF)queryset- Even if
get_queryset()is defined,querysetmust also be defined so that theRealtimeRoutercan determine the underlying model class at register-time. If you useget_querysetto dynamically filter the queryset in your view, you should also define an empty "sentinel" queryset on the view of the formModel.queryset.none(). This is what's recommended for other parts of REST Framework which require knowledge of a view's backing model.
- Even if
get_serializer_class()orserializer_classpermission_classesorget_permissions()