Re: Calendar app: how to model reccurring events?

2008-04-06 Thread Michael Richardson
> I'm in the process of writing my first Django project, which has a > calendar application. I'm not quite sure how I should model reccurring > events. My first idea was to use a Event table (containing all the > event data), and a RecurringEvent table which has only two rows: > parent

Re: Calendar app: how to model reccurring events?

2008-04-06 Thread Malcolm Tredinnick
On Sun, 2008-04-06 at 11:39 -0700, Benjamin Wohlwend wrote: [...] > That's what I found out pretty soon after trying to implement it. I > 'solved' it by storing the type of the child event in the Event table > and, if necessary, descending to the particular event, depending on > the stored type.

Re: Calendar app: how to model reccurring events?

2008-04-06 Thread Benjamin Wohlwend
Hi Malcom, thanks for your thorough answer! On Apr 6, 6:29 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sat, 2008-04-05 at 02:49 -0700, Benjamin Wohlwend wrote: > > > I'm tending to the second design, since I would be able to combine > > both event types in a single queryset. > >

Re: Calendar app: how to model reccurring events?

2008-04-05 Thread Malcolm Tredinnick
On Sat, 2008-04-05 at 02:49 -0700, Benjamin Wohlwend wrote: [...] > My second idea was to use the fancy new model inheritance of the > queryset-refactor branch. Specifically I would use multi-table > inheritance. A parent model, 'Event' contains data like owner > (ForeignKey to User) and date.