diff --git a/django/core/management/commands/dumpdata.py b/django/core/management/commands/dumpdata.py
index 1622929..1f89dfd 100644
a
|
b
|
|
1 | 1 | from django.core.exceptions import ImproperlyConfigured |
2 | 2 | from django.core.management.base import BaseCommand, CommandError |
3 | | from django.core import serializers |
4 | | from django.db import router, DEFAULT_DB_ALIAS |
5 | 3 | from django.utils.datastructures import SortedDict |
6 | 4 | |
7 | 5 | from optparse import make_option |
… |
… |
class Command(BaseCommand):
|
13 | 11 | make_option('--indent', default=None, dest='indent', type='int', |
14 | 12 | help='Specifies the indent level to use when pretty-printing output'), |
15 | 13 | make_option('--database', action='store', dest='database', |
16 | | default=DEFAULT_DB_ALIAS, help='Nominates a specific database to dump ' |
| 14 | help='Nominates a specific database to dump ' |
17 | 15 | 'fixtures from. Defaults to the "default" database.'), |
18 | 16 | make_option('-e', '--exclude', dest='exclude',action='append', default=[], |
19 | 17 | help='An appname or appname.ModelName to exclude (use multiple --exclude to exclude multiple apps/models).'), |
… |
… |
class Command(BaseCommand):
|
28 | 26 | args = '[appname appname.ModelName ...]' |
29 | 27 | |
30 | 28 | def handle(self, *app_labels, **options): |
| 29 | # Late imports to be able to get command help even when DATABASES |
| 30 | # setting contains errors |
| 31 | from django.core import serializers |
31 | 32 | from django.db.models import get_app, get_apps, get_model |
| 33 | from django.db import router, DEFAULT_DB_ALIAS |
32 | 34 | |
33 | 35 | format = options.get('format') |
34 | 36 | indent = options.get('indent') |
35 | | using = options.get('database') |
| 37 | using = options.get('database', DEFAULT_DB_ALIAS) |
36 | 38 | excludes = options.get('exclude') |
37 | 39 | show_traceback = options.get('traceback') |
38 | 40 | use_natural_keys = options.get('use_natural_keys') |