New course! Every coder should learn Generative AI!
Try a free lesson+ 1
I think you have to use some javascript / ajax tricks.
Something like this.
https://simpleisbetterthancomplex.com/tutorial/2016/08/29/how-to-work-with-ajax-request-with-django.html