Model Inheritance question

2009-06-25 Thread LeeRisq
If I am looking to use an abstract base class with multiple models, which is assigned the primary key id? The child or the parent? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Model inheritance question

2008-11-02 Thread felix
see also this: http://www.djangosnippets.org/snippets/1031/ for a tumblelog I have been actually fetching queries for each item type, concatenating them as lists, then sorting by date. that's much simpler since its usually mostly display. I mostly use model inheritance in situations where I need

Re: Model inheritance question

2008-11-02 Thread Ramiro Morales
On Sun, Nov 2, 2008 at 4:52 AM, void <[EMAIL PROTECTED]> wrote: > > Can someone point to the correct way to do this? > > Suppose i'm working in a tumblelog, it's basically , 4 o 5 tipes of > "post item" that share some cmmon information. > > So the first approach i would go is: > > cllass

Model inheritance question

2008-11-02 Thread void
Can someone point to the correct way to do this? Suppose i'm working in a tumblelog, it's basically , 4 o 5 tipes of "post item" that share some cmmon information. So the first approach i would go is: cllass Post(models.Model): here goes common metada of all things that can be "posted" like

Poor man's model inheritance question.

2006-10-31 Thread medhat
Hi, I am using OneToOneField to simulate model inheritance. I have all the shared fields in a base model, and then for every specific case I have a derived model that has a OneToOneField to that base model. That was all working fine. Recently I was trying to encapsulate some of the