From 07465b635d4c3df50181bbb85bc2c3c6811822b2 Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Mon, 6 Apr 2009 20:28:55 +0000 Subject: [PATCH] Fixed a small error in the docs that I missed from [10408]. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10409 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/ref/contrib/admin/actions.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ref/contrib/admin/actions.txt b/docs/ref/contrib/admin/actions.txt index 2bc75c0b6e..fc3e00feb8 100644 --- a/docs/ref/contrib/admin/actions.txt +++ b/docs/ref/contrib/admin/actions.txt @@ -201,7 +201,7 @@ objects as JSON:: from django.http import HttpResponse from django.core import serializers - def export_as_json(request, queryset): + def export_as_json(modeladmin, request, queryset): response = HttpResponse(mimetype="text/javascript") serialize.serialize(queryset, stream=response) return response @@ -220,7 +220,7 @@ that simply redirects to your custom export view:: from django.contrib.contenttypes.models import ContentType from django.http import HttpResponseRedirect - def export_selected_objects(request, queryset): + def export_selected_objects(modeladmin, request, queryset): selected = request.POST.getlist(admin.ACTION_CHECKBOX_NAME) ct = ContentType.objects.get_for_model(queryset.model) return HttpResponseRedirect("/export/?ct=%s&ids=%s" % (ct.pk, ",".join(selected)))