person = People(firstname=firstname, lastname=lastname)
person.save(using=MY_DB)
newuser = User(username=username, person=person)
newuser.save(using=MY_DB) # to illustrate, but it fails at the
previous line
returns
Cannot assign "<People: People object>": "People" instance isn't saved
in the database.
Using a router class telling models User and People to always use MY_DB,
instead of the 'using' keyword, does not help.
At least there is a point missing in the documentation.
--
Ticket URL: <https://code.djangoproject.com/ticket/25749>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* component: Uncategorized => Database layer (models, ORM)
* needs_tests: => 0
* keywords: => foreign key
* needs_docs: => 0
* type: Uncategorized => Bug
--
Ticket URL: <https://code.djangoproject.com/ticket/25749#comment:1>
* needs_docs: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/25749#comment:2>
* status: new => closed
* resolution: => wontfix
--
Ticket URL: <https://code.djangoproject.com/ticket/25749#comment:3>