#23135: Multiple routers cause problems with migration/sql management commands
-------------------------------------+-------------------------------------
Reporter: Geladriet | Owner: nobody
Type: Bug | Status: new
Component: Core (Management | Version: 1.7-rc-2
commands) | Resolution:
Severity: Normal | Triage Stage:
Keywords: | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Geladriet):
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
A workaround for the problem:
{{{
def allow_migrate(self, db, model):
"""
Make sure the app only appears on the right db.
"""
if db == 'second_db':
if model._meta.app_label in ('SampleModel2', 'SampleModel'):
return True
else:
return False
elif model._meta.app_label in ('SampleModel2', 'SampleModel'):
return False
return None
}}}
If I think more about it, the current behavior is more or less right. But
works completely different then in Django 1.6.
This can leads to confusion because of the current sample in the
documentation.
--
Ticket URL: <https://code.djangoproject.com/ticket/23135#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.ab0856ca44881d008752cefb0174cdb3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.