Thanks for this package and especially for the HTMX and Unpoly examples. It helped me realize that Unpoly might be a better fit (in my case) given the up-validate mechanism without needing a separate view.
When this is done, though, selecting a different make in the example causes the form to be validated. I.e., switching from "Audi" to "Toyota" causes the validation error "Select a valid choice. a1 is not one of the available choices.".
Is there any way to avoid that?
One way I thought about it, seeing the example in the official docs for [up-validate], is to handle it differently when the X-Up-Validate header is present:
if 'X-Up-Validate' in request.headers:
form = MakeAndModelForm(initial=request.POST)
But there might be a better way to achieve this.
Thanks for this package and especially for the HTMX and Unpoly examples. It helped me realize that Unpoly might be a better fit (in my case) given the
up-validatemechanism without needing a separate view.When this is done, though, selecting a different make in the example causes the form to be validated. I.e., switching from "Audi" to "Toyota" causes the validation error "Select a valid choice. a1 is not one of the available choices.".
Is there any way to avoid that?
One way I thought about it, seeing the example in the official docs for [up-validate], is to handle it differently when the
X-Up-Validateheader is present:But there might be a better way to achieve this.