def METHOD_NAME(self, request, *args, **kwargs):
    form = self.get_form(self.form_class)
    new_post = None
    if not request.is_ajax():
        new_post = self.object.last_message.pk != int(request.POST.get("last_post"))
    if "preview" in request.POST or new_post:
        if request.is_ajax():
            content = render(request, "misc/preview.part.html", {"text": request.POST.get("text")})
            return StreamingHttpResponse(content)
        else:
            form = self.create_forum(self.form_class, **{"text": request.POST.get("text")})
    elif form.is_valid():
        return self.form_valid(form)
    return render(
        request,
        self.template_name,
        {
            "topic": self.object,
            "posts": self.posts,
            "last_post_pk": self.object.last_message.pk,
            "newpost": new_post,
            "form": form,
        },
    )