mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-23 15:54:16 +03:00
Now it is possible to display viewset w/o paginator
Since pagination is now included in every generic viewset, we should have ability to disable it and we have it: paginator=None or pagination_class=None. But this piece of code relies on existence of property instead of its value.
This commit is contained in:
parent
311cad64c9
commit
548ac9a65e
|
@ -611,7 +611,7 @@ class BrowsableAPIRenderer(BaseRenderer):
|
|||
renderer_content_type += ' ;%s' % renderer.charset
|
||||
response_headers['Content-Type'] = renderer_content_type
|
||||
|
||||
if hasattr(view, 'paginator') and view.paginator.display_page_controls:
|
||||
if getattr(view, 'paginator', None) and view.paginator.display_page_controls:
|
||||
paginator = view.paginator
|
||||
else:
|
||||
paginator = None
|
||||
|
|
Loading…
Reference in New Issue
Block a user