Browse Source

Pagination, at least half of it

master
Sebastian Lohff 6 years ago
parent
commit
626f9fcf5d
  1. 4
      bgpdata/views.py

4
bgpdata/views.py

@ -1,9 +1,11 @@ @@ -1,9 +1,11 @@
from django.shortcuts import render
from bgpdata.models import CrawlRun, AS, Peering
from django.core.paginator import Paginator
def overview(request):
crawls = CrawlRun.objects.order_by("-startTime")
return render(request, 'bgpdata/overview.html', {"crawls": crawls})
crawlsPage = Paginator(crawls, 20)
return render(request, 'bgpdata/overview.html', {"crawls": crawlsPage.page(1)})
def showMap(request, crawlId):
crawl = None

Loading…
Cancel
Save