1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #13308 -- Ensured that dumpdata correctly interacts with router allow_syncdb directions. Thanks to Francis (wizard_2) for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12940 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee
2010-04-09 13:08:08 +00:00
parent e9bbdb39de
commit 7b47609629
2 changed files with 30 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
from django.core.exceptions import ImproperlyConfigured
from django.core.management.base import BaseCommand, CommandError
from django.core import serializers
from django.db import connections, DEFAULT_DB_ALIAS
from django.db import connections, router, DEFAULT_DB_ALIAS
from django.utils.datastructures import SortedDict
from optparse import make_option
@@ -79,7 +79,7 @@ class Command(BaseCommand):
# Now collate the objects to be serialized.
objects = []
for model in sort_dependencies(app_list.items()):
if not model._meta.proxy:
if not model._meta.proxy and router.allow_syncdb(using, model):
objects.extend(model._default_manager.using(using).all())
try: