Questions tagged [flask]

1 votes
0 replies
TypeError: 'module' object is not callable Flask JWT
I'm working on a Flask server where we have a route to validate a user's JWT token using the library flask-jwt-extended. This is what our route l...
asked 4 months ago
0 votes
0 replies
uWSGI + nginx + Flask: Site can't be reached
About a month ago I finished setting up my AWS EC2 Ubuntu 18.04 server to run my Flask app. Since then, I have been developing and testing locall...
asked 4 months ago
3 votes
0 replies
Flask CSRF Protection setting invalid Set-Cookie on response headers
I'm creating a product catalog using Flask and Firebase Authentication. I'm following their docs on how to set up both client and server using th...
0 votes
0 replies
Opt-out model columns from being serialized
I am using Flask, Flask-SqlAlchemy, Flask-Marshmallow and Marshmallow-SqlAlchemy among other frameworks to build an application. I have for examp...
asked 4 months ago
1 votes
1 replies
Getting unwanted escape character in JSON using Python's Flask and jsonpickle
from flask import Flask, request, abort from flask_restful import Api, Resource import jsonpickle app = Flask(__name__) api = Api(app) user_dic...
1 votes
0 replies
I need to output this output formate to web server through flask
My output formate from python code looks like this: 6 3781.0 29 1964.0 116 3075.0 11 99.0 20 3042.0 Name: book_id, dtype:...
asked 4 months ago
0 votes
1 replies
How to check a DWForms field for spaces?
I'm using Python3.6 with Flask and WTForms. I have several form validations that work, but the one that checks the username for spaces isn't work...
asked 4 months ago
0 votes
0 replies
D3.js render and redirect to different HTML via Flask on click
I am trying to render an HTML when clicking on specific areas of my D3.js chart. However, the return render_template(...) does not seem to be red...
asked 4 months ago
-2 votes
1 replies
How to save sessions in a Postgres database?
In one of our new projects, we want to store the session data in to a PostgreSQL database. I have found several code snippet on the internet to...
asked 4 months ago
1 votes
1 replies
How to set background image dynamically in Jinja2?
I am building my personal website, which require to set a background. I can do it with following way. <header class="masthead" style="backgr...
asked 4 months ago
0 votes
0 replies
How can I make the template folder the root folder for flask?
I'd like my folder structure for Flask to be main_folder app.py (Flask script) index.html instead of the usual main_folder templa...
asked 4 months ago
1 votes
0 replies
jQuery to submit and render template
I sent a data to server using post in javascript. At the server it handles a data and return a html template. How can I open this template in new...
asked 4 months ago
0 votes
1 replies
Sending a dictionary from JS to Flask via AJAX [duplicate]
This question already has an answer here: How do I POST an array of objects with $.ajax (jQuery or Zepto)...
asked 4 months ago
-1 votes
0 replies
I need help because I have trouble updating information by GET request without refreshing page using ajax [closed]
Is there a way I can keep track of the variable, and update accordingly, or maybe right a setInterval() function to update the list every 2 secon...
asked 4 months ago
0 votes
1 replies
Processing POST json data in python flask app on Azure
I have a basic python flask app deployed on Azure which I am trying to get to process json data that I am posting to it via a REST client. Here...
asked 4 months ago
0 votes
0 replies
Bokeh updating data efficiently in Flask application
I render a Bokeh figure by using components function of Bokeh on my route in my Flask application. script, div = components(layout) I have one...
asked 4 months ago
1 votes
0 replies
Flask application throws “Exec format error” when run with debug=True
I am following some online tutorials but it doesn't matter what I do I can't make the debug work...can anyone help? from flask import Flask , re...
asked 4 months ago
0 votes
0 replies
How do I mock PyMongo for testing with a Flask app?
I've found similar questions, but they seem to only cover mocking MongoDB and don't mention Flask. I have a Flask app and I'm trying to unit tes...
asked 4 months ago
0 votes
1 replies
Target link to iframe on table row click
I am trying to pass a specific link to an <iframe> when clicking a row on my HTML table. With the code on the bottom, it simply opens the l...
asked 4 months ago
0 votes
0 replies
How to do that flask get boolean variable javascript and based on this variable return suitable html
Welcome, I need help. I have script in javascript which detects type device on which launched webpage. Later based on returned value by javascrip...
asked 4 months ago
0 votes
1 replies
How do I route data from one page to other in flask?
I have a page index.html that has to send two values to main.html. From index.html, I send an ajax request to /api/session_load with a json objec...
asked 4 months ago
0 votes
1 replies
Raise TemplateNotFound(template) jinja2.exceptions.TemplateNotFound: index.html
I am just providing a piece of code here. When i run the whole code its showing Index.html file is not found. app = Flask(__name__) CORS(ap...
asked 4 months ago
0 votes
0 replies
Using fetch to pass the data to Flask server with ajax causing bad request error
This program is about a text summarizer. The input is taken from a text area and then passed to Flask server. I have used ajax fetch to post the...
asked 4 months ago
2 votes
2 replies
How do I display Python dictionary data correctly in a Flask web page?
I'm training a CNN model by KERAS. I want to show the model's predict results in Flask web page.The trouble is that I want to return a dictionary...
asked 4 months ago
0 votes
1 replies
Can't connect with upwork to get any information
I try to use upwork api in flask to get some information, but it doesn't work. How could I get something from upwork with its api? file app.py...
asked 4 months ago