D
D
Dauren S2016-03-17 20:21:49
Django
Dauren S, 2016-03-17 20:21:49

Django order by desc?

In django I have a field in a model . Field "created"
I need to make a selection of the last 5 materials sorted by date from the end. In general, show the last 5 articles.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dauren S, 2016-03-18
@dauren101

order_by('-created')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question