def METHOD_NAME(request, form_class=PageSelectForm):
    if not request.user.profile.is_superuser:
        raise Http403
    if request.method=="POST":
        form = form_class(request.POST)
        if form.is_valid():
            pages = form.cleaned_data['pages']
            infos = []
            for page in pages:
                infos.append({
                    "url": page.get_absolute_url(),
                    "label": page.title,
                    "id": page.id,
                })
            return HttpResponse(json.dumps({
                "pages": infos,
            }), content_type="text/plain")
    return HttpResponse(json.dumps({
                "error": True
            }), content_type="text/plain")