mirror of
https://github.com/django/django.git
synced 2025-10-27 23:56:08 +00:00
boulder-oracle-sprint: Merged to [5234]
git-svn-id: http://code.djangoproject.com/svn/django/branches/boulder-oracle-sprint@5235 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -1463,20 +1463,24 @@ def load_data(fixture_labels, verbosity=1):
|
||||
if verbosity > 1:
|
||||
print "No %s fixture '%s' in %s." % \
|
||||
(format, fixture_name, humanize(fixture_dir))
|
||||
if count[0] == 0:
|
||||
if verbosity > 0:
|
||||
print "No fixtures found."
|
||||
else:
|
||||
if verbosity > 0:
|
||||
print "Installed %d object(s) from %d fixture(s)" % tuple(count)
|
||||
|
||||
if count[0] > 0:
|
||||
sequence_sql = backend.get_sql_sequence_reset(style, models)
|
||||
if sequence_sql:
|
||||
if verbosity > 1:
|
||||
print "Resetting sequences"
|
||||
for line in sequence_sql:
|
||||
cursor.execute(line)
|
||||
|
||||
transaction.commit()
|
||||
transaction.leave_transaction_management()
|
||||
|
||||
if count[0] == 0:
|
||||
if verbosity > 0:
|
||||
print "No fixtures found."
|
||||
else:
|
||||
if verbosity > 0:
|
||||
print "Installed %d object(s) from %d fixture(s)" % tuple(count)
|
||||
|
||||
load_data.help_doc = 'Installs the named fixture(s) in the database'
|
||||
load_data.args = "[--verbosity] fixture, fixture, ..."
|
||||
|
||||
Reference in New Issue
Block a user