Category "flask"

WTF-Forms EqualTo validator not giving error message

I have a registration form with a password and confirm password field. When the form is submitted and the passwords do not match, it is not returning any error

render html strings in flask templates [duplicate]

I'm building a web page to show articles. In my database, I have to attributes, one of which is used to put Markdown code and the other to s

I want the dropdown choice to be the one registered in my database with Flask

I have some code, but it gives me an error. It's done with Flask, and here is the error: https://hastebin.com/emifitopof.sql File forms.py class PostForm(FlaskF

CommandError: Can't locate revision identified by '...' when migrating using Flask-Migrate

I started using Flask-Migrate today and installed it on a test project. However i am getting following error: alembic.util.exc.CommandError: Can't locate r

Can't import MigrateCommand from flask_migrate

I made a manage.py file for database migration in a Flask application and I get an error when trying to import MigrateCommand. I'm using PyCharm and I'm sure th

How to print spaces from inside a variable in jinja2

I am trying to print a variable number of spaces stored in a variable in jinja2, but jinja is escaping the contents of the variable. So when I store &nbsp i

How To Deploy an Update to Python Flask Application with Gunicorn and Nginx on Ubuntu 18.04

Python Flask / Gunicorn / Nginx newbie here. I followed this tutorial describing how to serve Flask Applications with Gunicorn and Nginx on Ubuntu 18.04. Everyt

Flask-restx request parser returns 400 Bad Request

I'm using flask-restx in my flask application but each time I use the swagger ui to make a request it returns this 400: http://127.0.0.1:5000/api/user/register/

ERR_CONNECTION_REFUSED on browser when opening dtale with Eclipse Pydev

Opening a dtale sheet using Eclipse Pydev on Windows leads to ERR_CONNECTION_REFUSED on browser. The same code works on spyder and jupyter however. I know dtale

Failing to deploy flask tesseract app to heroku

I wanted to deploy my tesseract app to heroku but it is always 'unable to locate package tesseract-ocr' and is unable to deploy it. I was following this tutoria

How to reference a html template from a different directory in python flask

@app.route('/view', methods=['GET', 'POST']) def view_notifications(): posts = get_notifications() return render_template("frontend/src/view_notificatio

Python Flask calling functions using buttons

Once the button in my flask template is pressed I'd like it to call a python function defined in app.py that I made to be available to be called within the temp

Set max number of threads in Flask

I am using Flask as service for requests that execute heavy processing tasks. I want to use multi threading. I made a test and opened 100 threads. I'm afraid th

Error running docker container: starting container process caused "exec: \"python\": executable file not found in $PATH": unknown

I am trying to dockerize a simple Python-Flask application but I am getting an error while running my container. docker: Error response from daemon: OCI runtim

How to validate Fields.Raw in Flask Marshmallow

I'm trying to set up a Webservice that accepts Images via POST methods. I'm using Python Flask as well as Flask-Apispec to create a Swagger documentation. I thu

Meraki API - Redirect stdout, stderr to websocket or file

I'm using a Flask route to call the Meraky python library and trying to redirect the stdout and stderr of each API call to a websocket or eventually a log file,

Unit testing Flask Babel translations

I'd like to do some unit tests to check my flask app translations. I have tried this piece of code: def test_pt_br(self): with app.test_request_context():

python get form data how can this be?

This is my js function for ajax form submit: $('.sendButton').on('click', function(){ $.post( "/send-form", $('#contactForm').serialize()) } This is my f

Flask-Script: from flask._compat import text_type ModuleNotFoundError: No module named 'flask._compat'

When using Flask-Script I get an error when importing Manager. I have installed with pip Flask and Flask-Script. How do I fix this? manage.py from flask_script

Failed to decode JSON object: Expecting value: line 1 column 1 (char 0)

This question is kind of duplicate but I could not find a solution to it. When I am calling the flask app and passing the JSON data, I am getting the error: "F