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
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)
2 matches
Mail list logo