Category "flask"

Implementing OpenID with Apache Superset. AttributeError: 'bool' object has no attribute 'is_active'

I am trying to implement OpenID in Apache Superset. I am using Broadcom CA-SSO as my provider. I found a similar post in Stack Overflow where someone implemente

How do I setup files to run multiple flask (nginx, gunicorn) applications on one server? (specify separate ports)

After getting each application to run on their own you need to specify the port in the application, nginx and gunicorn/service files. I am using AWS with Centos

how to view WTForms validation errors?

I am writing some basic tests and have a test failing. def test_new_user_registration(self): self.client.get('/user/register') form = RegistrationForm(

Connecting Heroku Database to SQLAlchemy

so as part of a Web Programming MOOC, I have to connect to a PostgreSQL Database hosted on Heroku using Python and SQLalchemy. I have spent a lot of hours tryin

Logout if session expires from no activity and redirect to login page

I'm trying to update a website with flask where users have accounts and are able to login. I want to make user session expire and logout if there is no activity

How to display validation errors when WTForms is coupled with Jquery Form Plugin?

I am trying to combine WTForms with jQuery Form Plugin. With the latter, I bind a form and provide a callback function. On the other hand, WTForms has to do th

Flask blueprint static directory does not work?

According to the Flask readme, blueprint static files are accessible at blueprintname/static. But for some reason, it doesn't work. My blueprint is like this:

Python Vlookup to return one value only - similar to excel

I'm trying to replicate an Excel Vlookup in Python, using Flask. I've an excel sheet, set out like this: (Item is column A, Price is column B). Item:

Return Excel file in Flask app

I am creating a Flask application that prompts the user for an Excel file, does some work with it, then returns the file back to the user so that they can downl

Simple Flask app runs but page will not load

So last night I closed terminal without closing my flask app or deactivating my venv. I think maybe this is the cause of the issue but none of my googling has y

Nested print statements in Jinja template

I am creating a link in a Jinja2 template using Flask and I am running into a problem. I want to access a variable passed to the template within a code block, b

Flask CORS work only for first request, what's the bug in my code?

background There is a JS app serving at 127.0.0.1:8080, which refers some API serving at 127.0.0.1:5000 by a Flask app. [See FlaskCode] When I open this js app

Flask: The browser (or proxy) sent a request that this server could not understand

I created a small Flask service. However each time I tried to use the say-hi endpoint, I get the following message: { "message": "The browser (or proxy) sen

Get query string as function parameters on flask

Is there a way to get query string as function parameters on flask? For example, the request will be like this. http://localhost:5000/user?age=15&gender=Ma

Jquery button click to send AJAX request with Flask and Python

I am trying to make a web application that accepts button clicks. The button clicked then sends a specific device, and operation code to the python application

ImportError: cannot import name 'Markup' from 'jinja2'

When I recently deployed my project that includes Flask==1.0.2 and Jinja2>=2.10.1, I got the following error. It was running fine when I deployed it the prev

flask-sqlalchemy or sqlalchemy

I am new in both flask and sqlalchemy, I just start working on a flask app, and I am using sqlalchemy for now. I was wondering if there is any significant benef

How to return a dict as a JSON response from a Flask view?

I have a function that analyzes a CSV file with Pandas and produces a dict with summary information. I want to return the results as a response from a Flask vie

Pass variables to Flask's render_template

I want to pass multiple variables from my Flask view to my Jinja template. Right now, I can only pass one. How do I pass multiple variable when rendering a temp

How to perform periodic task with Flask in Python

I've been using Flask to provide a simple web API for my k8055 USB interface board; fairly standard getters and putters, and Flask really made my life a lot eas