avoid duplicating randomly selected and recent

This commit is contained in:
Tomáš Mládek 2020-04-13 21:07:54 +02:00
parent b85520f7b8
commit 02c157337c

View file

@ -51,7 +51,7 @@ class IndexView(BasePileView):
return {
'recent_documents': self.documents.order_by('-uploaded')[:5],
'random_document': choice(self.documents.all()),
'random_document': choice(self.documents.all()[5:]),
**base_context_data
}