You could use the isnull filter: http://www.djangoproject.com/documentation/db-api/#isnull
If your model is setup correctly, that'll do the trick On Sat, Jun 14, 2008 at 2:03 PM, robbie <[EMAIL PROTECTED]> wrote: > > Hi! > > I'd like to know if there is any way you can filter a data-set based > on an empty DateTimeField? Let's say I have a Message model with a > DateTimeField named read; what I would like to do is to list all > messages with an empty (null) read field. > This is probably very easy, but I'm new to both Python and Django, so > don't be too hard on me. :) > > > > --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---