mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-04-24 00:24:48 +00:00
Don't paginate if the user is reordering
This commit is contained in:
parent
8b1db37b44
commit
414b3684b9
1 changed files with 9 additions and 8 deletions
|
|
@ -34,14 +34,15 @@ def index(request, parent_page_id=None):
|
|||
ordering = 'title'
|
||||
|
||||
# Pagination
|
||||
p = request.GET.get('p', 1)
|
||||
paginator = Paginator(pages, 50)
|
||||
try:
|
||||
pages = paginator.page(p)
|
||||
except PageNotAnInteger:
|
||||
pages = paginator.page(1)
|
||||
except EmptyPage:
|
||||
pages = paginator.page(paginator.num_pages)
|
||||
if ordering != 'ord':
|
||||
p = request.GET.get('p', 1)
|
||||
paginator = Paginator(pages, 50)
|
||||
try:
|
||||
pages = paginator.page(p)
|
||||
except PageNotAnInteger:
|
||||
pages = paginator.page(1)
|
||||
except EmptyPage:
|
||||
pages = paginator.page(paginator.num_pages)
|
||||
|
||||
return render(request, 'wagtailadmin/pages/index.html', {
|
||||
'parent_page': parent_page,
|
||||
|
|
|
|||
Loading…
Reference in a new issue