Add a slight hack to reload the page after success
This commit is contained in:
parent
c1fbf81bd4
commit
478c07160e
|
@ -31,7 +31,7 @@ def htmx_create_customer(request):
|
|||
form = CustomerForm(request.POST)
|
||||
if form.is_valid():
|
||||
form.save(commit=True)
|
||||
return HttpResponse("Success")
|
||||
return HttpResponse("<script>location.reload()</script>")
|
||||
else:
|
||||
return render(request,
|
||||
"customers/partials/customer_create.html",
|
||||
|
|
Loading…
Reference in New Issue