Ticket #5423: 5423.diff
File 5423.diff, 798 bytes (added by , 17 years ago) |
---|
-
django/core/management/commands/dumpdata.py
1 1 from django.core.management.base import BaseCommand, CommandError 2 2 3 import sys 3 4 from optparse import make_option 4 5 5 6 class Command(BaseCommand): … … 36 37 for model in get_models(app): 37 38 objects.extend(model.objects.all()) 38 39 try: 39 return serializers.serialize(format, objects, indent=indent)40 serializers.serialize(format, objects, indent=indent, stream=sys.stdout) 40 41 except Exception, e: 41 42 raise CommandError("Unable to serialize database: %s" % e)