@csrf_protect
@permission_required("comments.can_moderate")
def approve(request, comment_id, next=None):
    comment = get_object_or_404(comments.get_model(), pk=comment_id, site__pk=settings.SITE_ID)

    # Delete on POST
    if request.method == 'POST':
        # Flag the comment as approved.
        perform_approve(request, comment)
        return next_redirect(request, next, approve_done, c=comment.pk)

    # Render a form on GET
    else:
        return render_to_response('comments/approve.html',
            {'comment': comment, "next": next},
            template.RequestContext(request)
        )

# The following functions actually perform the various flag/aprove/delete
# actions. They've been broken out into separate functions to that they
# may be called from admin actions.
Approve a comment (that is, mark it as public and non-removed). Confirmation
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/django/contrib/comments/views/moderation.py/approve