LeeRisq wrote:
> 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?
Abstract classes don't get database tables at all, so only the child
will have the key.
--~--~-~--~~~---~--~~
You
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
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
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 Post(mod
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
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 functionality
6 matches
Mail list logo