V
V
Vladisus2015-04-19 13:56:40
Django
Vladisus, 2015-04-19 13:56:40

How to make a 'global' queryset shuffle in CBV?

I have a ListView that renders a queryset and a page, on the page I use django-endless-pagination with twitter-style pagination, that is, objects are loaded using ajax. I want to give the elements in random order, but when added order_by('?'), the entire queryset is randomized each time when loading, that is, the next time I load, I have duplicates. Does anyone know what to do with this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri Shikanov, 2015-04-19
@dizballanze

stackoverflow.com/a/4027044/1137026 here is a good answer

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question