Currently, django.contrib.comments sends the user to the preview page if there is any error on the form.
I am using comments in the context of a blog and I would much rather that the user stayed on the page they were on if something went wrong with the submission. As far as I can tell though, this is hard-coded in django.contrib.comments.views.comments.post_comment:
# If there are errors or if we requested a preview show the comment
if form.errors or preview:
    template_list = [
        "comments/%s_%s_preview.html" % tuple(str(model._meta).split(".")),
        "comments/%s_preview.html" % model._meta.app_label,
        "comments/preview.html",
    ]
    return render_to_response(
        template_list, {
            "comment" : form.data.get("comment", ""),
            "form" : form,
            "next": next,
        },
        RequestContext(request, {})
    )
Is there any way that I can change this behavior without changing the source code to django.contrib.comments?
Any pointer would be appreciated...
Thanks!
Looks like you have two real options:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With