dispatch/api/mixins.py
def exclude_fields(self):
        """Excludes fields that are included in the queryparameters"""
        request = self.context.get('request')
        if request:
            exclude = request.query_params.get('exclude', None)
            if exclude is None: return
                
            excluded_fields = exclude.split(',')
            for field in excluded_fields:
                self.fields.pop(field)
def exclude_fields(self):
        """Excludes fields that are included in the queryparameters"""
        request = self.context.get('request')
        if request:
            exclude = request.query_params.get('exclude', None)
            if exclude is None: return
                
            excluded_fields = exclude.split(',')
            for field in excluded_fields:
                self.fields.pop(field)
Excludes fields that are included in the queryparameters