Hi Rodrigue,
thats exactly what i tried as a first, but unfortunately something
like this doesn't work. And seems there isn't any "standard"
workaround for this.
Solutions are:
1.) call raw sql for creating record in B table,
2.) copy all local_fields values from a to b, after this save works..
If you look here http://docs.djangoproject.com/en/dev/topics/db/models/#id7
you'll see that multi-table inheritance is handled at the db level
"via an automatically-created OneToOneField". This means that an
instance of B has a foreign key to an instance of A.
At the model level, there should be
Hi, i didn't found noting about it in docs, so i'll try to ask, first
explanation, i have:
class A(models.Model):
name = models.CharFiled(, required=True)
.
class B(A):
I have an existing instance of A, say `a`
and i "want to make" instance of b out of it.
i'm
3 matches
Mail list logo