Django queryset with True values excluded

My first and second reactions to this are that I’d be looking at a different design for my models. While I don’t know the application you’re trying to build or what your actual requirements are, I can’t help but think “there’s got to be a better way”.

I’m going to make the guess that this is intended to be some type of “delivery scheduling” application, where you’re trying to track the time slots that are available in the future. You’re creating one row for each delivery, where that delivery occupies one (or more) time slots.

The purpose of your query here then is to determine what time slots are available on a given day.

Am I close?

If so, it seems to me that you’re going to be a lot better off if you were to keep one separate calendar object rather than spreading the calendar data across “N” different customers.