Re: The last records of table by using of Pagination

2008-01-11 Thread shabda
instead of q_list = ObjectPaginator(Queue.objects.all(), 20) Provide a order_by, if you would like them to be in descending order, in order when they were created have, q_list = ObjectPaginator(Queue.objects.all().order_by('-id'), 20) Or better yet have a created_on field in the model, w

The last records of table by using of Pagination

2008-01-11 Thread Nader
Hello, I use a view in an application with which I can present the 20 pages of a table at once. from queues.models import Queue def list(request, page=0, message=" "): page = int(page) q_list = ObjectPaginator(Queue.objects.all(), 20) has_previous = q_list.has_previous_page(page)