S
S
Sergey Nizhny Novgorod2016-06-07 01:53:19
Django
Sergey Nizhny Novgorod, 2016-06-07 01:53:19

How to output three random entries from a model in Django?

Guys, hello everyone.
I am currently making a simple side bar on a site with similar posts.
The task is this.
There is a model for articles. Three random records need to be derived from this model. We do not know the number of records and their id. How it is better to implement it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question