Thank you, it works! :-)
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more optio
This should work without grabbing the entire table:
[x[0] for x in
Wizard.objects.filter(**filterargs).annotate(wpower=Sum('creatures__power')).order_by('-
wpower').values_list('id', 'wpower')]
Rgds,
Marcos
On Tue, Mar 22, 2011 at 5:25 PM, Andreas Pfrengle wrote:
> just pulling it up again...
>
just pulling it up again...
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more op
Hello,
I want to annotate a Queryset, order it by the annotated field and
then return a simple (ordered) values_list of the ids of the objects:
Wizard.objects.filter(**filterargs).annotate(wpower=Sum('creatures__power')).order_by('-
wpower').values_list('id', flat=True)
The 'Creature'-Model has
4 matches
Mail list logo