mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #17535 -- Optimized list generic views.
When allow_empty is False, prevented the view from loading the entire queryset in memory when pagination is enabled.
This commit is contained in:
@@ -128,6 +128,8 @@ urlpatterns = patterns('',
|
||||
views.AuthorList.as_view(paginate_by=30)),
|
||||
(r'^list/authors/notempty/$',
|
||||
views.AuthorList.as_view(allow_empty=False)),
|
||||
(r'^list/authors/notempty/paginated/$',
|
||||
views.AuthorList.as_view(allow_empty=False, paginate_by=2)),
|
||||
(r'^list/authors/template_name/$',
|
||||
views.AuthorList.as_view(template_name='generic_views/list.html')),
|
||||
(r'^list/authors/template_name_suffix/$',
|
||||
|
||||
Reference in New Issue
Block a user