'Adds expand information from query parameters to the serializer context to support expandable fields.'

def get_serializer_context(self):

    result = super(ExpandableFieldViewMixin, self).get_serializer_context()
    result['expand'] = [x for x in self.request.query_params.get('expand', '').split(',') if x]
    return result
