def METHOD_NAME(self, request, *args, **kwargs):
    self.object = self.get_object()
    page = self.get_comment_page()
    if self.is_comment_locked():
        return HttpResponseForbidden()
    parent = request.POST.get('parent')
    if parent:
        if len(parent) > 10:
            return HttpResponseBadRequest()
        try:
            parent = int(parent)
        except ValueError:
            return HttpResponseBadRequest()
        try:
            parent_comment = Comment.objects.get(hidden=False, id=parent, page=page)
        except Comment.DoesNotExist:
            return HttpResponseNotFound()
        if not (self.request.user.has_perm('judge.change_comment') or
                parent_comment.time > timezone.now() - settings.DMOJ_COMMENT_REPLY_TIMEFRAME):
            return HttpResponseForbidden()
    form = CommentForm(request, request.POST)
    if form.is_valid():
        comment = form.save(commit=False)
        comment.author = request.profile
        comment.page = page
        with LockModel(write=(Comment, Revision, Version), read=(ContentType,)), revisions.create_revision():
            revisions.set_user(request.user)
            revisions.set_comment(_('Posted comment'))
            comment.save()
        return HttpResponseRedirect(request.path)
    context = self.get_context_data(object=self.object, comment_form=form)
    return self.render_to_response(context)