On Sun, 2008-02-10 at 03:59 -0800, Darthmahon wrote:
> Hey,
> 
> I want to get a list of events that are happening today and I'm using
> this query:
> 
> Event.objects.filter(date__exact=datetime.now())

[...]

> Any ideas? I'm importing datetime at the top of my views.py file
> (where the query is run).

You want to use datetime.datetime.now(). The datetime module contains a
number of classes, of which "datetime" is only one.

Regards,
Malcolm

-- 
Success always occurs in private and failure in full view. 
http://www.pointy-stick.com/blog/


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

Reply via email to