What is the correct syntax for calling a SELECT query in MariaDB from a Registration Form. Specifically, in the WHERE clause. I’ve been looking all over the net to debug this and it does not seem to work (semantically). Here is the code in my python flask. “”The visEmail is the variable that is supposed to be holding the email
Tag: flask
flask app not running automatically from Dockerfile
My simple flask app is not automatically starting when I run in docker, though I have added CMD command correctly. I am able to run flask using python3 /app/app.py manually from container shell. Hence, no issue with code or command I run docker container as When I log in to docker container and run “ps -eaf” on Ubuntu shell of
Flask-Restx not converting enum field type to JSON
I need help with Enum field type as it is not accepted by Swagger and I am getting error message **TypeError: Object or Type eGameLevel is not JSON serializable**. Below is the complete set of code for table. Complete set of code with DB table and sqlalchemy settings is provided. I already tried it with Marshmallow-Enum Flask package and it
LOGIN FORM FLASK FAILS
I have a RegisterForm and LoginForm made with Flask and hashed with sha256. The RegisterForm works, but the login page is not returning anything. I stay in the same login page, the only difference is the url returns this: And the url change to this: Thank you for the help Answer I think you forgot to change the login form
ModuleNotFoundError: No module named ‘wtforms.fields.html5’
I have a flask app that uses wtforms. I have a file which does: I just wanted to rebuild my docker container and now I have this error: I have in my requirements.txt: I tried to add flask_WTF but it did not fix it. Any idea what’s going on? I thought of upgrading wtforms but it seems like I have
How to get multiple images from Flask request object at once in case of Content-Type:multipart/form-data?
I’m supposed to get multiple image files from the requests, but I can’t find a way to split a byte string request.files[key].read() properly to make np.ndarrays out of them. Answer files[key] gives only one object which has name=key in HTML, and .read() gives data only for this single file. So there is no need to split it. If you have
Images not hosted on server with flask, jinja2 and html
I want to load images from links with flask and jinja2. This is what I’m trying: I have checked that anime.cover = https://animeflv.net/uploads/animes/covers/2430.jpg, but the images won’t load. What is a possible solution? Thank you in advance! Answer First check to make sure you’re getting your anime object (I can’t tell from the question). Then, check to make sure your
How do I pass inputs from jQuery to Flask?
I have three inputs I am trying to pass the values back to a function inside my app, from the index.html rendered in Flask. Here are the inputs: Here is the script to assign and render their values on the page (for Rate and Percent of income sliders) as well as my start at trying to pass the values. Here
Posting file upload via AJAX returns empty dictionary on Flask side
I have a Flask app that was working until I added login functionality. The issue I’m having is I have a modal that the user can upload a file with. HTML Then an AJAX call to upload the file: And finally the Flask code I’m using to debug: The command line output on the python side is: So it’s returning
Flask-CORS does not apply to responses returned by WSGI middleware
I have a Flask application that uses Flask-CORS, as well as a WSGI middleware that returns a custom response instead of the Flask app for some routes. For responses the middleware returns, Flask-CORS is not applied, so I’ve had to apply the CORS headers manually to that response. I tried reversing the order that the middleware and Flask-CORS are applied,