> On Sun, 2008-12-14 at 00:46 +0100, Alfredo Alessandrini wrote:
>> Hi,
>>
>> It's possible call a query with max or min value?:
>>
>> like this:
>>
>> game_list = game.objects.filter(Q(max_rating > player.rating) &
>> Q(min_rating < player.rating))
>
> Not yet. Search the archives of this list for the word "aggregates" to
> see a lot more discussion on this and the plans going forwards.
>
> Regards,
> Malcolm


It's possible by:

game_list = 
game.objects.exclude(min_rating__gt=player.rating).exclude(max_rating__lt=player.rating)



Alfredo

--~--~---------~--~----~------------~-------~--~----~
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to