Open KyeRussell opened 4 years ago
Hi,
I've the same issue, it should be very interesting to add this hook for step validations : I've some ModelForm + ModelFormset (having the ModelForm as FK of the ModelFormset) that could benefit of it. For now, I validate the formset with client-side JS, which is not perfect, because I do not want to hack the post() method...
My particular issue was sidestepped by messing with some form code. It is not ideal in my case, and can foresee circumstances in which I'd still want my original request.
I might have a similar issue: I have two steps using a ModelForm and a ModelFormset.. One of these forms does not validate and I am lacking a proper way to log or debug.
Looking here:
https://github.com/jazzband/django-formtools/blob/master/formtools/wizard/views.py#L294
It appears that there is no way for me to do anything when a step's form submission fails, without overriding all of
post()
to put anelse:
on theif form.is_valid()
conditional.Firstly, am I right in this assertion?
If so, it'd be beneficial for me personally to have this ability. I don't want to intercept and provide a new response, I just need to do some background logging.