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

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -