Hi Robin,
Going with your alternative idea - it sounds like the model you have in mind is:
* a one-time-only event is represented as an Event record;
* a recurring event is represented as one Event record linked to as many EventInstance records as there are repeats of the event.
What if you change that slightly, so that a one-time event is represented as an Event record with one EventInstance - would that help? That way, when you're retrieving upcoming events, you only have to query the EventInstance table.
(Pondering on how Google Calendar does this. I wonder if they have an EventInstance model at all, given that it's possible to set up events that repeat every week indefinitely - presumably they don't create an infinite number of EventInstance records at that point :-) I'm guessing they just have the Event model, and encode the rules for repeating events within that - which would make querying for upcoming events more complex, but still doable in a SQL query - possibly even through the Django ORM.)
Cheers,
- Matt