Category "flask"

Flask:XMLHttpRequest at '...' from origin has been blocked by CORS policy No 'Access-Control-Allow-Origin' header is present on the requested resource

I am currently trying to get a small server running on my RaspberryPi and accessing it from my PC within the LAN. I get the following error when accessing the R

AJAX: Can I POST an array/data from my GET request? (Flask)

question similar to AJAX/FLASK/JS: How to POST existing array into endpoint?, a new question I've posted but this doesn't specifically help with the new issue,

unable to send post request in dio - flutter

I'm trying to send Post request from Flutter(dio) to my Flask Restful API and I want to give the request body in form-data because an image file needs to be sen

How to solve google chrome "Failed to load resource: net::ERR_CONNECTION_REFUSED" issue in windows 10 when server is running on Ubuntu 18.04?

I am trying to run this project on Ubuntu 18.04 server. I am running both server and client on this machine. Then from windows 10 with port 9000 I am getting ac

Cross Origin Problem with Flask Api (Access-Control-Allow-Origin)

Hello all good people. I have tested everything that I can find on internet and nothing is working to fix this problem. I'm really hoping that someone here can

Display wtforms SelectMultipleField display as drop-down and not list

I am using wtforms SelectMultipleField to render a form with a list of choices. Using a plain vanilla SelectField renders the choices as a drop-down (dropdown).

How can I set Beautify for VSCODE to indent Jinja2 and Flask?

Beautify indentation is ignoring Jinja2. I am using Beautify - HookyQR to help with formatting and indentation. HTML, Python, CSS ... everything works fine. But

Digitalocean Apps platform run time error - "workspace" directory is getting added

I could successfully deploy python/flask app on Digitalocean's Apps Platform. Now its giving runtime error app runtime log error: FileNotFoundError: [Errno 2] N

Flask-login pytest how to test logout

I am building a test suite for a flask app's auth blueprint. I've successfully built tests for user registering and login in, but I am having some trouble to te

Flask-SocketIo always using Polling

I have made an web app with flask and implemented socket-io in it using Flask-SocketIO but it is continuously using Polling method instead of Web Sockets. My JS

Error testing flask-socketio server emitted events with pytest

I'm building the test suite for a recently deployed webapp. It was built using flask-socketio and uses pytest for the testing suite. The big issue here is the l

Error while popping out Flask app context

I am trying to create an async API using threading (Celery is an overkill in my case). To achieve the same, I subclassed the Thread class in following manner. S

Get Paypal server side subscription with Flask

I'd like to have a simple solution to get the subscription ID after a payment approval in a Flask app. Paypal provides this code only for client side: <div i

How to delete or modify a database table using Flask-SQLAlchemy?

Is there a way to delete or modify a table using flask-sqlalchemy? I am working on a Flask-based web app. I switched to flask-sqlalchemy as my project is on Her

Error: While importing 'wsgi', an ImportError was raised. Python Flask Ubuntu 20.04

I am building a backend using Python and Flask, everything worked fine, but after some updates on the Pipfile (updated some packages) I got this error when I tr

"The CSRF session token is missing" when CSRF token is present in request

I am using Flask-WTF to use its CSRF security feature for my API. As the title suggests, the response I get from the API says that the "CSRF session token is mi

List of query params with Flask request.args

I am trying to pass comma separated query parameters to a Flask endpoint. An example URI would be: localhost:3031/someresource#?status=1001,1002,1003 Looking at

passing a filename as a parameter from a for loop in python flask

I am uploading file so i am trying to pass a filename after looping through but i am getting an unbountLocalerror. i have tried making the filename global so th

What does this app.directive snippet do in Angular?

I have the following snippet of code app.directive('widthSetter',function($timeout){ return { restrict: 'A', link: function (scope, element,

How to upload file from python Flask web app to Supabase Storage

I want to be able to upload a file from Flask to Supabase Storage, but it only has documentation for the javascript api link to docs. Also, I can't find any exa