Re: Django an STI

2009-03-07 Thread Vitaly Babiy
Thanks Malcolm for the response, I am only really instressed in the last part: The "complex" thing that we might do, one day, is providing a way to also retrieve all the descendents from a base table. It won't be particularly efficient, but that's because SQL is relational and not

Re: Django an STI

2009-03-07 Thread Malcolm Tredinnick
On Sat, 2009-03-07 at 06:50 -0600, Tim Chase wrote: [...] > A slightly less DRY solution than ideal (ideal=solving the VERY > complex STI problem in Django's ORM), Um .. no. That's the one thing that is almost certainly not going to happen. Single-table inheritance --- a.k.a shoving all your

Re: Django an STI

2009-03-07 Thread Vitaly Babiy
How would generic relations solve this problem, It has been recommend for me to look at it a few times but I can't seem to understand how it would work. Vitaly Babiy On Sat, Mar 7, 2009 at 7:50 AM, Tim Chase wrote: > > >> class Tracker(models.Model): > >>

Re: Django an STI

2009-03-07 Thread Tim Chase
>> class Tracker(models.Model): >>notifications = models.ForeignKey(Notification) >> >> class Notification(models.Model): >> # Common fields >> pass >> >> class EmailNotification(Notification): >>pass >> >> class SmsNotification(Notification): >>pass >> >> >> # I would be able

Re: Django an STI

2009-03-07 Thread Malcolm Tredinnick
On Fri, 2009-03-06 at 22:09 -0800, Vbabiy wrote: > I know django does not support STI, Based on what follows, I guess you mean "single table inheritance", meaning all columns for all models in the same table. > but I was wondering if there is > any way I can implement this behaviour. > > Here

Django an STI

2009-03-06 Thread Vbabiy
I know django does not support STI, but I was wondering if there is any way I can implement this behaviour. Here is an example of what I would like: class Tracker(models.Model): notifications = models.ForeignKey(Notification) class Notification(models.Model): # Common fields pass