On Fri, Mar 19, 2010 at 2:11 PM, het.oosten <[email protected]> wrote: > To clarify. If I have three houses, and house 120 has two > reservations, I get a list like this: > > 120 121 122 120 (if all are available) > > If the query matches one reservation of house 120 i get a list like > this: > > 121 122 120 > > House 120 should been excluded from the list though.
This still happens with the model suggested by bruno and a filter like: House.objects.exclude(reservations__arrival__range=(Check_arrival, Check_departure)).exclude(reservations__departure__range=(Check_arrival, Check_departure)) ? Nuno -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. 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.

