def filter_queryset(self, request, queryset, view):
        self.request = request
        self.view = view

        # Filter by identifiers in url
        for name, idents in self.filter_options.items():
            if name == "extra":
                continue
            ids = [ident.object_id for ident in idents]
            fn = getattr(self, 'filter_by_%s' % name, None)
            if not fn:
                fn = getattr(self.view, 'filter_by_%s' % name, None)
            if fn:
                queryset = fn(queryset, ids)
            else:
                raise Exception("Don't know how to filter by %s" % name)

        # Filter by any extra slugs in url
        if 'extra' in self.filter_options:
            fn = getattr(self.view, 'filter_by_extra', self.filter_by_extra)
            queryset = fn(queryset, self.filter_options['extra'])

        return queryset
dataset/ETHPy150Open wq/wq.db/patterns/identify/filters.py/IdentifierFilterBackend.filter_queryset/original