Django pagination is repeating results -
i have weird pagination bug in django: using object_list return of view, passing "paginate_by" argument it, it's repeating of results; otherwise, if remove argument or set "paginate_by=none", results correct.
if using pagination, quantity of results maintained @ total, so, because there repeated results, last results left out of list, don't appear in template.
any ideas of might happening?
thanks!
i had problem also, found solution.
the problem sorted dataset date. when had multiple records same date, pagination showed wrong records.
what did added searchfield, id, sortcriteria unique every record. , worked!
before:
self.filtered_nesgames = self.filtered_nesgames.order_by('releasedate')
after:
self.filtered_nesgames = self.filtered_nesgames.order_by('releasedate', 'id')
hth
Comments
Post a Comment