Re: Models inheritance in django: how to change PK "_ptr_id" on "id"?

2012-02-09 Thread JohnA
Glad you were able to resolve your problem. I use multi-table inheritance a lot and so far it always "just works" without me having to worry about or fiddle with the internal ids that Django uses to connect the derived class rows to the base class ones. -- John On Feb 8, 1:25 pm, Artyom

Re: Models inheritance in django: how to change PK "_ptr_id" on "id"?

2012-02-09 Thread Jean-Mark
You can also use the south application to manage migrations. pip install south Then add 'south' to the list of installed apps. To start off you can do ./manage.py schemamigration --initial appname ./manage.py migrate appname Then whenever you make a change to your models: ./manage.py

Re: Models inheritance in django: how to change PK "_ptr_id" on "id"?

2012-02-08 Thread Artyom Chernetzov
Thanks, everybody, problem was: I add ForeignKey field in object after dbsync. I just needed to reset database, it solve problem. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit

Re: Models inheritance in django: how to change PK "_ptr_id" on "id"?

2012-02-07 Thread akaariai
On Feb 7, 8:26 pm, Artyom Chernetzov wrote: > Here is model structure: Client is User, Client can be corporate or person: > >     class Client(User): >         #fields > >     class ClientCorporate(Client): >         #fields > >     class ClientPerson(Client): >        

Re: Models inheritance in django: how to change PK "_ptr_id" on "id"?

2012-02-07 Thread Andre Terra
I just read your e-mail quick and somewhat carelessly, so forgive me if I'm missing something. Here's a list of things for you to check: * Have you defined your Client model with abstract = True in its Meta options?[1] * Have you syncdb'd[2]? * If you must name your pk something else, just

Models inheritance in django: how to change PK "_ptr_id" on "id"?

2012-02-07 Thread Artyom Chernetzov
Here is model structure: Client is User, Client can be corporate or person: class Client(User): #fields class ClientCorporate(Client): #fields class ClientPerson(Client): #fields And client can make orders: class