I want to send an Excel file from UI to Node JS, extract authorization token in NODЕ JS and then send to the Flask Server. I don’t want to share my authorization token with the client UI, so I don’t want to send the file from there directly to Flask API. Also, I would like not to save the file
Tag: flask
Contained submit button validating other forms
I have two forms on my page, each with its own fields and submit button, but whenever I use any of them, they always check the overall page fields instead of just the form they’re contained in… The simulator.html has two forms, the first one is this: And the second one is this: The views.py file has the back-end code
Python | Flask, using request.form in a class to POST data and update Jinja Template
I am building a small app using a forex converter api, it’s function is to take one currency, and convert a value into the new currency. I seem to be getting caught when accessing my class “Survey” everything I try to get data from my html form. My program is getting caught on self.convertFrom=request.form[‘convertFrom’] and the python debugger is giving
Can i have two different sets of app configurations?
I have made a flask server REST API that does an upload to a specific folder. The upload must comply to a specific file extension, and must be in a specific folder. So i made these two app.configs: However, i want to make a new route, for a new upload of a specific file extension to another folder. So can
werkzeug.routing.BuildError: Could not build url for endpoint ‘profile’. Did you mean ‘index’ instead?
I’m new to programming and I’m following this tutorial: https://www.youtube.com/watch?v=SUC1aTu092w&ab_channel=edureka%21 | I’m trying to make a login system using flask and MySQLdb and I’ve run into this problem, I’m so confused. There’s nothing wrong with the database, I’ve checked multiple times. I’m using VS code. Error: werkzeug.routing.BuildError: Could not build url for endpoint ‘profile’. Did you mean ‘index’ instead? app.py
More elegant way to call arbitrary Python functions from Flask
Setting up a Flask REST API is easy. I use the following approach: In this example I import functions sitting inside utility.py: This allows me to pass any function name as an argument and get the result back. So if I ran the following in my browser: I would see: The way I process the request is quite bloated. You
Working outside of application context Flask JWT decorator issue
I am fairly new to Flask applications. While my application works for all the endpoints as expected when I tried to add jwt authorization I encountered this issue. I have tried this solution app.app_context().push() based on some other questions that have been posted. Any help would be greatly appreciated. I would also like to use the decorator in multiple apis,
Reading a docx file from s3 bucket with flask results in an AttributeError
I got so many different errors, I don’t even know which is pertinent to mention but it’s not about the credentials because I can upload files already and I can read a txt file. Now I want to read a docx. I created a form in my index.html with just a text area to write the exact name of the
Creating list of dictionaries from txt using values from for loop
Need to create a list of dictionaries with keys ‘Date’ and ‘Value’. The values of keys are stored in a txt file with following structure: The outputs with below code is {“01-01-2020 12:00:00″:”10”, “01-01-2020 13:00:00″:”9”}… What I would like to do is [{“Date”:”01-01-2020 12:00:00″,”Value”:”10″},{“Date”:”01-01-2020 13:00:00″,”Value”:”9″}…] Any help would be much appreciated, thanks. Answer Currently, you have created the dictionary object
Blueprints in Flask vs Apps in Django [closed]
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 2 years ago. Improve this question I am new to Flask and noticed something called Blueprint in Flask. I searched it and now I am using it