I'm currently making a POST request to my view on Django. I am doing this in my HTML file.
Post request:
class EventDetailView(DetailView):
model = Event
def post(self, request, *args, **kwargs):
return xyz
HTML:
<form method="post" onsubmit="return confirm('Confirm?');">...
</form>
How can I create this post request from a static Javascript file that my HTML file interacts with instead of from the HTML File?