summaryrefslogtreecommitdiff
path: root/django/core/management/commands/loaddata.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2010-08-09 21:22:37 +0000
committerAlex Gaynor <alex.gaynor@gmail.com>2010-08-09 21:22:37 +0000
commit6001ba016a3db4701d56abc6d30868d4e5d88dbf (patch)
tree7a42c57d802484300c2384d3cd3a968de1804383 /django/core/management/commands/loaddata.py
parentc7bd48cb9f645e5ff07d1e68b86130e3bb2b043f (diff)
[soc2010/query-refactor] Merged up to trunk r13556, resolved merge conflictsarchive/soc2010/query-refactor
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2010/query-refactor@13565 bcc190cf-cafb-0310-a4f2-bffc1f526a37
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