summaryrefslogtreecommitdiff
path: root/django/core/management/commands/loaddata.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/core/management/commands/loaddata.py')
-rw-r--r--django/core/management/commands/loaddata.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/django/core/management/commands/loaddata.py b/django/core/management/commands/loaddata.py
index 5db043e468..cda7daa541 100644
--- a/django/core/management/commands/loaddata.py
+++ b/django/core/management/commands/loaddata.py
@@ -112,7 +112,7 @@ class Command(BaseCommand):
formats = []
if formats:
- if verbosity > 1:
+ if verbosity >= 2:
self.stdout.write("Loading '%s' fixtures...\n" % fixture_name)
else:
sys.stderr.write(
@@ -128,7 +128,7 @@ class Command(BaseCommand):
fixture_dirs = app_fixtures + list(settings.FIXTURE_DIRS) + ['']
for fixture_dir in fixture_dirs:
- if verbosity > 1:
+ if verbosity >= 2:
self.stdout.write("Checking %s for fixtures...\n" % humanize(fixture_dir))
label_found = False
@@ -141,7 +141,7 @@ class Command(BaseCommand):
if p
)
- if verbosity > 1:
+ if verbosity >= 3:
self.stdout.write("Trying %s for %s fixture '%s'...\n" % \
(humanize(fixture_dir), file_name, fixture_name))
full_path = os.path.join(fixture_dir, file_name)
@@ -158,7 +158,7 @@ class Command(BaseCommand):
else:
fixture_count += 1
objects_in_fixture = 0
- if verbosity > 0:
+ if verbosity >= 2:
self.stdout.write("Installing %s fixture '%s' from %s.\n" % \
(format, fixture_name, humanize(fixture_dir)))
try:
@@ -198,7 +198,7 @@ class Command(BaseCommand):
return
except Exception, e:
- if verbosity > 1:
+ if verbosity >= 2:
self.stdout.write("No %s fixture '%s' in %s.\n" % \
(format, fixture_name, humanize(fixture_dir)))
@@ -207,7 +207,7 @@ class Command(BaseCommand):
if object_count > 0:
sequence_sql = connection.ops.sequence_reset_sql(self.style, models)
if sequence_sql:
- if verbosity > 1:
+ if verbosity >= 2:
self.stdout.write("Resetting sequences\n")
for line in sequence_sql:
cursor.execute(line)
@@ -217,10 +217,10 @@ class Command(BaseCommand):
transaction.leave_transaction_management(using=using)
if object_count == 0:
- if verbosity > 0:
+ if verbosity >= 1:
self.stdout.write("No fixtures found.\n")
else:
- if verbosity > 0:
+ if verbosity >= 1:
self.stdout.write("Installed %d object(s) from %d fixture(s)\n" % (object_count, fixture_count))
# Close the DB connection. This is required as a workaround for an