You probably want __gte in your filter, if your timestamp field is a
datetime field, otherwise plain old = should work.
When in doubt, you can always print (result.timestamp, date.today() ) or
even use the type() function to make sure you're comparing apples to
apples.

-----Original Message-----
From: django-users@googlegroups.com
[mailto:django-users@googlegroups.com] On Behalf Of kenneth gonsalves
Sent: Tuesday, June 12, 2012 7:11 AM
To: django-users@googlegroups.com
Subject: Re: Filter by today

On Tue, 2012-06-12 at 07:46 +0100, Simon Pickles wrote:
> result = Attempt.objects.filter(timestamp = date.today())

should it not be datetime.datetime.today()?
-- 
regards
Kenneth Gonsalves

-- 
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.


-- 
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