1
0
mirror of https://github.com/django/django.git synced 2025-10-28 08:06:09 +00:00

boulder-oracle-sprint: Merged rest of package to trunk [4719]

git-svn-id: http://code.djangoproject.com/svn/django/branches/boulder-oracle-sprint@4722 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Boulder Sprinters
2007-03-13 15:40:41 +00:00
parent 429a542cec
commit ca343fc0ac
25 changed files with 1549 additions and 914 deletions

View File

@@ -1463,7 +1463,7 @@ def dump_data(app_labels, format='json', indent=None):
for model in get_models(app):
objects.extend(model.objects.all())
try:
print serializers.serialize(format, objects, indent=indent)
return serializers.serialize(format, objects, indent=indent)
except Exception, e:
sys.stderr.write(style.ERROR("Unable to serialize database: %s\n" % e))
dump_data.help_doc = 'Output the contents of the database as a fixture of the given format'
@@ -1609,7 +1609,7 @@ def execute_from_command_line(action_mapping=DEFAULT_ACTION_MAPPING, argv=None):
parser.print_usage_and_exit()
elif action == 'dumpdata':
try:
action_mapping[action](args[1:], options.format, options.indent)
print action_mapping[action](args[1:], options.format, options.indent)
except IndexError:
parser.print_usage_and_exit()
elif action in ('startapp', 'startproject'):