Задать вопрос

Тел: +7 965 3737 888

439

Просмотров

0

Ответов

Fetching top items

<p>This is a method from the custom manager for the Snippet model used on this site; the basic idea is to be able to ask for the top n "foo", where "foo" is something related to Snippet. For example, you can use top_items('tag') to get the top Tags ordered by how many Snippets are associated with them.</p>
<p>I have a feeling that I could get this down to one query, but haven't yet put in the time for it.</p>

Вопрос полезен? Да0/Нет0
file_5141.py(2.0Кб)
None