avoid duplicating randomly selected and recent
This commit is contained in:
parent
b85520f7b8
commit
02c157337c
1 changed files with 1 additions and 1 deletions
|
@ -51,7 +51,7 @@ class IndexView(BasePileView):
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'recent_documents': self.documents.order_by('-uploaded')[:5],
|
'recent_documents': self.documents.order_by('-uploaded')[:5],
|
||||||
'random_document': choice(self.documents.all()),
|
'random_document': choice(self.documents.all()[5:]),
|
||||||
**base_context_data
|
**base_context_data
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue