Following this example,
I tried to use it with one of my models.
def index(request):
firstTen = Person.objects.all()
pagination = Paginator(firstTen, 2)
page = request.GET.get('page')
try:
people = pagination.page('page')
except PageNotAnInteger:
people = pagination.page(1)
return render_to_response('index.html', {'people': people},
context_instance=RequestContext(request))
For some reason i am getting 'Page' object is not iterable
when using it in my view like so
{% for result in people %}
{% endfor %}