On 6/4/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> You can use Q objects to preform OR queries. So it would look like
> this:
>
> from django.db.models import Q
> games = Game.objects.filter(Q(home_team=searchTeam) |
>
> Q(away_team=searchTeam)).filter(game_date__range(date_form.cleaned
You can use Q objects to preform OR queries. So it would look like
this:
from django.db.models import Q
games = Game.objects.filter(Q(home_team=searchTeam) |
Q(away_team=searchTeam)).filter(game_date__range(date_form.cleaned_data['startDate'],
date_form.cleaned_data['endData'])).order_by('games_
Hi there. Long-time PHP developer now getting into Python and Django.
I'm using the latest version of Django from SVN and are building a query
that does the following:
Give me all the games where
homeTeam = searchTeam OR awayTeam = searchTeam
AND game_date is between start_date and end_date
ORDER
3 matches
Mail list logo