Answer the question
In order to leave comments, you need to log in
How to send a POST request using AJAX and Flask MethodView?
Good day to all! I have a Flask application whose views are written using a class MethodView
from the flask.views
. Most views are forms (used by Flask-WTF), so they have methods get
and post
. How can I rewrite the code so that the method post
executes asynchronously using AJAX and does not freeze the page for the duration of the request? Is it even possible to do this using MethodView
? All of the AJAX examples on the web use a more standard way of describing views: functions with a decorator @app.route
.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question