Ticket #14888: rem_code_dup.diff
File rem_code_dup.diff, 1.8 KB (added by , 14 years ago) |
---|
-
django/core/serializers/json.py
18 18 internal_use_only = False 19 19 20 20 def end_serialization(self): 21 self.options.pop('stream', None)22 self.options.pop('fields', None)23 self.options.pop('use_natural_keys', None)24 21 simplejson.dump(self.objects, self.stream, cls=DjangoJSONEncoder, **self.options) 25 22 26 23 def getvalue(self): -
django/core/serializers/base.py
31 31 """ 32 32 self.options = options 33 33 34 self.stream = options. get("stream", StringIO())35 self.selected_fields = options. get("fields")36 self.use_natural_keys = options. get("use_natural_keys", False)34 self.stream = options.pop("stream", StringIO()) 35 self.selected_fields = options.pop("fields", None) 36 self.use_natural_keys = options.pop("use_natural_keys", False) 37 37 38 38 self.start_serialization() 39 39 for obj in queryset: -
django/core/serializers/pyyaml.py
38 38 super(Serializer, self).handle_field(obj, field) 39 39 40 40 def end_serialization(self): 41 self.options.pop('stream', None)42 self.options.pop('fields', None)43 self.options.pop('use_natural_keys', None)44 41 yaml.dump(self.objects, self.stream, Dumper=DjangoSafeDumper, **self.options) 45 42 46 43 def getvalue(self):