Re: Get an ordered queryset from a FK relation

2010-07-02 Thread Dennis Kaarsemaker
On vr, 2010-07-02 at 16:10 -0700, eka (Esteban) wrote: > I have an Entry model with a FK to User, what I want is to get a list > of Users ordered by its Entry quantity. Can I achieve that using > QuerySets? queryset.annotate(Count('entry')).order_by('entry__count') See http://docs.djangoproject.

Get an ordered queryset from a FK relation

2010-07-02 Thread eka (Esteban)
Hi all, I have an Entry model with a FK to User, what I want is to get a list of Users ordered by its Entry quantity. Can I achieve that using QuerySets? Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email