mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-05 04:50:12 +03:00
Merge e69f68b28d
into fd72a814f8
This commit is contained in:
commit
20fc082236
|
@ -610,11 +610,14 @@ class BrowsableAPIRenderer(BaseRenderer):
|
|||
|
||||
queryset = view.get_queryset()
|
||||
elements = []
|
||||
for backend in view.filter_backends:
|
||||
if hasattr(backend, 'to_html'):
|
||||
html = backend().to_html(request, queryset, view)
|
||||
if html:
|
||||
elements.append(html)
|
||||
if not hasattr(view, 'filter_class'):
|
||||
pass
|
||||
else:
|
||||
for backend in view.filter_backends:
|
||||
if hasattr(backend, 'to_html'):
|
||||
html = backend().to_html(request, queryset, view)
|
||||
if html:
|
||||
elements.append(html)
|
||||
|
||||
if not elements:
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue
Block a user