python - django comments: how to prevent form errors from redirecting the user to the preview page? -
Currently, django.contrib.comments sends the user to the preview page if there is an error on the form.
I am using comments in the context of a blog and I would be too much of it that the user stayed on the page where something went wrong in the submission. As far as I can tell, it is very difficult - django.contrib.comments.views.comments.post_comment:
# If there are any errors or if we request a preview Show the comments if the form. Errors or Preview: Template_list = ["Comments /% s_% s_preview.html" Tuplal (SRR (model_mta) .split ("."), "Comments /% s_preview.html"% Model.AMMTA ("Comment" "," "Form": form, "next": next,}, ".", "Comment" / "preview" requestContext (request, {}))
Is there any way that I can change this code without source code in django.contrib.comments?
Any pointer will be appreciated ...
Thanks!
It seems that you have two real choices:
- your Write your own view Copy potentially to start the code for that view.
- An extra parameter to look at the patch, such as 'preview_on_errors' which is the default for the default, can be overridden. Contribute the patch back to the Zadego so that others can get the benefit.
Comments
Post a Comment