mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-23 01:51:08 +00:00
Use elided page range for federated peer list
This commit is contained in:
parent
992e478e95
commit
03a5ac9c3f
1 changed files with 5 additions and 1 deletions
|
@ -33,9 +33,13 @@ class Federation(View):
|
|||
servers = servers.order_by(sort)
|
||||
|
||||
paginated = Paginator(servers, PAGE_LENGTH)
|
||||
page = paginated.get_page(request.GET.get("page"))
|
||||
|
||||
data = {
|
||||
"servers": paginated.get_page(request.GET.get("page")),
|
||||
"servers": page,
|
||||
"page_range": paginated.get_elided_page_range(
|
||||
page.number, on_each_side=2, on_ends=1
|
||||
),
|
||||
"sort": sort,
|
||||
"form": forms.ServerForm(),
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue