Skip to content
Advertisement

Tag: flask

Solve Cross Origin Resource Sharing with Flask

For the following ajax post request for Flask (how can I use data posted from ajax in flask?): I get a Cross Origin Resource Sharing (CORS) error: I tried solving it in the two following ways, but none seems to work. Using Flask-CORS This is a Flask extension for handling CORS that should make cross-origin AJAX possible. http://flask-cors.readthedocs.org/en/latest/ How to

Flask url_for URLs in Javascript

What is the recommended way to create dynamic URLs in Javascript files when using flask? In the jinja2 templates and within the python views url_for is used, what is the recommended way to do this in .js files? Since they are not interpreted by the template engine. What basically want to do is: Which is not possible. But naturally, I

Advertisement