Fixed #11034: Corrected serialization example in admin actions doc. Thanks timo and kaikuehne.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10804 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
21cee79ee4
commit
3465ac05a6
|
@ -216,7 +216,7 @@ objects as JSON::
|
|||
|
||||
def export_as_json(modeladmin, request, queryset):
|
||||
response = HttpResponse(mimetype="text/javascript")
|
||||
serialize.serialize(queryset, stream=response)
|
||||
serializers.serialize("json", queryset, stream=response)
|
||||
return response
|
||||
|
||||
Generally, something like the above isn't considered a great idea. Most of the
|
||||
|
|
Loading…
Reference in New Issue