Questions tagged as 'flask'

0
answers

Make post request in python by sending a base64 image

Hello, I am studying python and I am trying to create a post in python that receives an image, saves it to the computer and sends it to an external service through a request.post. aux = imagem.read().encode("base64") files = {'file':aux} hea...
asked by 28.09.2018 / 23:39
0
answers

TypeError: Object of type 'NotFound' is not JSON serializable

I am mounting an ionic APP that makes request for an API in flask. The following error appeared when I try to make a post request:    TypeError: Object of type 'NotFound' is not JSON serializable But when I test only the API doing request...
asked by 26.08.2018 / 00:04
1
answer

Application deploy flask in heroku with flask-sqlalchemy

Good afternoon. I have a small application written in flask and I'm having problems with the database when trying to deploy in heroku and after searching for two days I did not find any solution that would meet me. In summary, this is the...
asked by 22.08.2018 / 20:34
3
answers

How to make flask run the launch of Python 3 instead of Python2.7?

I tried to launch a Flask app, which you can find on GitHub . Surprised it starts with Python2.7 now, while it launched with Python3 before. It did not work very badly. I do not know what the reason is. (MyFlaskAppEnv) mike@mike-thinks:~/Prog...
asked by 01.08.2018 / 18:18
2
answers

Flask SqlAlcheny TypeError: 'Fermentables' object is not iterable

In model FermentableTypes : class FermentableTypes(db.Model): __tablename__ = "fermentable_types" id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(50)) desc = db.Column(db.String(255)) def __s...
asked by 25.06.2018 / 15:36
1
answer

Form in Flask does not work [closed]

When I click the Send button nothing happens, I leave a blank field, idem. routes.py file from flask import * from forms import * app=Flask(__name__) @app.route('/') @app.route('/home') def home(): return render_template('homepage.html...
asked by 01.06.2018 / 21:59
0
answers

Cache Storage with Python

I'm trying to use WPA in a Flask application. I would like to know if it is possible with Flask or Python itself to store my pages in the browser's Cache Storage? From what I've seen so far I'll have to use javascript, but I'm trying to avoid...
asked by 31.05.2018 / 01:24
1
answer

How to change form fields depending on the user

I'm using Flask Admin and Flask security to log in to it. I can get no problem to define depending on the role of a user whether or not he can create an object, but I would also like to be able to add or remove fields from the creation / editing...
asked by 15.05.2018 / 23:07
2
answers

Flask - sending form return to another function

Below is my default.py where I define the end-points; What I'm trying to do is grab the FORM information that is in "/" send to return_request () and show the result of the Request in / output " def return_request(endPoint): headerInfo =...
asked by 08.05.2018 / 17:06
1
answer

Error in WEB API with flask

I started my WEB API study trying to create a Pokedex API, when I tried to create the pokemon search function by the number the following error appeared: "json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)" appPokedex:...
asked by 12.04.2018 / 19:38