On 4/22/07, drackett <[EMAIL PROTECTED]> wrote:
>
> I am trying to grab objects from a model only if they are not complete
> using a context processor. This is the code I have right now, but it
> doesn't work. Is there an easy way to filter by if a date field is
> empty/null?
>
> def event_open(request):
> from app.events.models import Event
> return {'event_open': Event.objects.filter(date_closed)}
is
return {'event_open': Event.objects.filter(date_closed__isnull=True)}
what you are looking for?
you will find a list of available db lookups on
http://www.djangoproject.com/documentation/db-api/#field-lookups
>
>
> >
>
--
Honza Kr�l
E-Mail: [EMAIL PROTECTED]
ICQ#: 107471613
Phone: +420 606 678585
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---