You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Line 72 currently causes all ajax-delivered POST requests to uniformly generate HTTP 200 responses, rather than returning an HttpResponseBadRequest with the same content in the event that there are errors. Currently, this means that anyone submitting an ajax request must create event handlers to inspect the errors json object in the receiving browser, in addition to the standard metrics of readystate and response status. This also means that when using a library, such as jQuery, library-standard detection of form errors on ajax calls will not work.
To permit the ajax handlers to rely exclusively on the readystate and response status for determination of an error, Line 72 could be replaced with the following 4 lines:
(Assuming, of course, that HttpResponseBadRequest is also imported on line 8.)
Presumably, if this setting needed to be able to be designated per-form, rather than globally, an additional setting could be added to the Form model and checked against in the if-clause...
The text was updated successfully, but these errors were encountered:
Line 72 currently causes all ajax-delivered POST requests to uniformly generate HTTP 200 responses, rather than returning an
HttpResponseBadRequest
with the same content in the event that there are errors. Currently, this means that anyone submitting an ajax request must create event handlers to inspect theerrors
json object in the receiving browser, in addition to the standard metrics of readystate and response status. This also means that when using a library, such as jQuery, library-standard detection of form errors on ajax calls will not work.To permit the ajax handlers to rely exclusively on the readystate and response status for determination of an error, Line 72 could be replaced with the following 4 lines:
(Assuming, of course, that
HttpResponseBadRequest
is also imported on line 8.)Presumably, if this setting needed to be able to be designated per-form, rather than globally, an additional setting could be added to the Form model and checked against in the if-clause...
The text was updated successfully, but these errors were encountered: