I'm wanting to display only current (vs. expired) calendar events via
my Django events app. Each event has a date that it will occur. But
I'm not sure of the best method to get only the current events in the
db.

Current events are those whose date is less than or equal to the
present date. They are expired when the present date is greater than
the event date.

I have been able to display only the current events in the generic
list view for all events by doing the following in my URLs:

event_list_info = {
        'queryset' : Event.objects.filter(date__gte=datetime.date.today()),
        'allow_empty' : True,
}

What's the best way to do this in my models?
--~--~---------~--~----~------------~-------~--~----~
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