> To do the filter you want, you can use the 'range' field lookup: > import datetime > start_date = datetime.date.today() > end_date = some_other_date > events = > Event.objects.filter(eventdate__beginning_date__range=(start_date, > end_date)) > > If you've already picked an event, you can get its future eventdates > with > event.eventdate_set.filter(range=(start_date, end_date))
This solution work, but it seems that it's not possible to order the event by the beginning date of the eventdate object. Does anyone have an idea in order to solve this problem ? Thanks --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---