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

Fixed #2515 -- Allow passing of options to JSON serializer. Thanks, nesh.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3795 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick
2006-09-22 13:26:07 +00:00
parent 96bc9ec79d
commit d8b84cac91
3 changed files with 17 additions and 1 deletions

View File

@@ -16,7 +16,7 @@ class Serializer(PythonSerializer):
Convert a queryset to JSON.
"""
def end_serialization(self):
simplejson.dump(self.objects, self.stream, cls=DateTimeAwareJSONEncoder)
simplejson.dump(self.objects, self.stream, cls=DateTimeAwareJSONEncoder, **self.options)
def getvalue(self):
return self.stream.getvalue()