I get empty page errors trying to Page my posts. I have 7 posts but I get a blank page error when I want to go to Page seven and i can't see my last post.
new_list = list(zip(yeni_ders_tarih, yeni_ders_saat, yeni_ders_ismi,yeni_ders_ogretmen,
yeni_derslik, yeni_yoklama))
paginator = Paginator(new_list, 1)
sayfa = request.GET.get('post')
page7 = paginator.page('7')
page = page3.object_list
try:
listeler = paginator.page(post)
except PageNotAnInteger:
listeler = paginator.page(1)
except EmptyPage:
listeler = paginator.page(1)
Also, I can get page seven manually.
return render(request, 'pages/ogrenci-profil.html', context={
'new_list':listeler,
'page':page
})
This is my template.html
<tbody>
This is manually get page seven
Aucun commentaire:
Enregistrer un commentaire