def __init__(self, request):
        """Create new query observer.

        :param request: A `queryobserver.request.Request` instance
        """

        # Obtain a serializer by asking the viewset to provide one. We instantiate the
        # viewset with a fake request, so that the viewset methods work as expected.
        viewset = request.viewset_class()
        viewset.request = api_request.Request(request)
        viewset.request.method = request.method
        viewset.format_kwarg = None
        viewset.args = request.args
        viewset.kwargs = request.kwargs
        self._request = request
        self._viewset = viewset
        self._viewset_method = getattr(viewset, request.viewset_method)
        self._meta = Options(viewset, self._viewset_method)
def __init__ ( self , request ) : viewset = request . viewset_class ( ) viewset . request = api_request . Request ( request ) viewset . request . method = request . method viewset . format_kwarg = None viewset . args = request . args viewset . kwargs = request . kwargs self . _request = request self . _viewset = viewset self . _viewset_method = getattr ( viewset , request . viewset_method ) self . _meta = Options ( viewset , self . _viewset_method )
Create new query observer.

        :param request: A `queryobserver.request.Request` instance