def query_from_request(self, request, queryset, fields=None): """Wrap for query_from_request """ fields = fields or self.fields dfields = {} for x in fields: dfields[x] = self._mapping[x] return utils.query_from_request(request, queryset, dfields)
def query_from_request(self, request, queryset, fields=None): """Wrap for query_from_request """ fields = fields or self.fields dfields = {} if type(fields) == type([]): for x in fields: dfields[x] = self._mapping[x] else: dfields = fields return utils.query_from_request(request, queryset, dfields)