Skip to content
Advertisement

Tag: flask

Flask using password of user without providing it in clear text

I have a flask application where I login to another service for which I need login data. So I have my endpoint in the flask application /service and this endpoint uses a username and password which I currently have in clear text, meaning My problem is that I can not provide the username and password with the request because another

Args do not unpack

I’m learning flask and i want to unpack args in inner function. That’s my code: I’m getting an arror “tuple index out of range” even if I add next asterix in Can I unpack it anywhere else? Answer If you print args and kwargs, you will find that user is passed in kwargs (by calling func(user=xxx)). The problem is that

Returning plt.show() on HTML with Python Flask

I’m using Python Flask to take input from a simple html file. The HTML asks the user to input a state and when they do that I would like for the output to be a plot. I have the following code that’s creating the Python Flask but when a user inputs a state, the plot outputs in my Jupyter Notebook

Pass dynamic url parameter for flask url_for

I have the below URL’s mapping to one form: How do I pass dynamically to “url_for” in form? This is my route: Answer Pass it as second argument to url_for Edit: For the dynamic one, you simply pass the variable. and when you are rendering the template, send your dynamic value. Refer: https://flask.palletsprojects.com/en/2.1.x/quickstart/#url-building

Inheriting name of category in Flask

I am working on budget app in Flask. Homepage give you ability to create names of Budgets and then names are transformed to links href which transfer you to another page with budget details. I want heading from /add_budget page to be inherit from budget name defined by user and it works fine until I add second budget – in

Can’t Query and iterate through database

I am trying to filter only the rows that have the foreign id of 1 or in this case ‘Skincare’ I have tried both, but no matter what combo I try it either applies no filter, nothing at all shows up, or I get an error that it is not iterable. I want Answer I’m not sure what is going

Advertisement