Category "flask"

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

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

python: can't open file 'manage.py': [Errno 2] No such file or directory when compose docker

I run two different Apps in containers. Django App Flask App Django ran just well. I configured my Flask App as follow: This Is a docker-compose.yml version: '3

Is there a way to add style to flask app?

I'm trying to add css to my html page in Flask, but it doesn't work. I tried the code in online editor and it works. HTML page (results.html): <div> <l

is it possible to have a flask app and an ejs website

i am making a flask app and usually i would do the following code: from flask import ( Flask, render_template, request ) app = Flask(__name__) @

How to add multiple path locations in flask

i was thinking to simulate a disk full situation. so that after certain number of files gets uploaded into one location it will automatically switch to differen

How to proxypass Apache to a dockerized Flask/Gunicorn app

We have a server running apache2 that is hosting a number of websites and applications. We have a dockerized Flask application (served with Gunicorn) that we wo

Flask: How to pass values to base.html?

Some data needs to be present in all templates. How can I transfer the data I need to base.html? For normal templates I use the render() function. I do not unde

request returning "Endpoint request timed out"

I have deployed a flask app on aws lambda using zappa now the app is running fine on all end points except my main one when i give post request on it it returns

Sending cookies/sessions to subdomains

As the title says, I'm trying to set cookies/sessions on the browser. To preface: Frontend: https://www.example.com Backend: https://api.example.com Frontend ma