Uses #3597, but without using `Context`.
This commit is contained in:
Marlon 2015-12-05 11:10:39 -06:00
parent 9f74b8860e
commit c1b70538a2

View File

@ -118,10 +118,9 @@ class DjangoFilterBackend(BaseFilterBackend):
def to_html(self, request, queryset, view): def to_html(self, request, queryset, view):
filter_class = self.get_filter_class(view, queryset) filter_class = self.get_filter_class(view, queryset)
if filter_class: if not filter_class:
return None
filter_instance = filter_class(request.query_params, queryset=queryset) filter_instance = filter_class(request.query_params, queryset=queryset)
else:
filter_instance = None
context = { context = {
'filter': filter_instance 'filter': filter_instance
} }