TL;DR running flask –app from the command line results in Error: No such option: –app. The current version of Anaconda (at the time of this question) includes Flask version 1.x. Here is the code from the Flask hello world tutorial at: palletsprojects.com quickstart and running it with: flask –app hello run results in the error, How can I run this
Tag: flask
Is there a performance deficit not splitting endpoints in Flask?
Just a question as to whether, for example, the following code would be faster in the second format rather than the first. Currently I am using the first example (with around 10 different options) and am wondering whether it would improve performance to split up the end point as in the second example. First example: Second Example Answer Depends if
Why am I getting PermissionError [Errno 13] when attempting to write to log in Flask hosted by Apache?
I am running Flask 1.1.4 via Python 3.5.3, hosted via an Apache 2 server on Debian Stretch. I am attempting to log various messages from the program, using the python logging module. This works normally. However, if I restart the Apache server using sudo service apache2 restart, the Flask application errors out with PermissionError: [Errno 13] Permission denied: (log file
MultiCheckbox Field Validation with Flask WTForms
I have a WTForm and I am trying to validate a custom multi-checkbox field, When I set the required flag to true, every checkbox needs to be checked. I just need at least one checkbox to be selected. When I don’t set the required flag, the native, and very elusive (is doesn’t appear in js, html, or css via developer
Adding CSS loader to HTML button click
I’m trying to add a “loader” while my flask application runs a task. Here is my HTML for for my button Here is the CSS that I’ve added: Any ideas on how to call this correctly? Answer Make it visible from the start, without ever showing it with javascript. Then hide it with js like so: EDIT: I now realize
Flask: Python List is displaying values in HTML file with quote marks and round brackets
I have the below function which returns a list It is being called this way and passed to the html file this way The display code in HTML file is as below but it is being displayed with round brackets and quote marks as below The query getting the values from database is as below I added a print statement
Flask login page keeps loading and does not take to a new /main page where it is supposed to go?
So, I have this flask application and I have used flask_login and flask forms to set up an authentication for my webpage. When I run it on a local development server, it works completely fine and upon putting right username and password, I am able to go to the main page which resides on /main route. Now, I had to
What is the best way to create a dynamic selection list from database column with Python and Flask WFForms?
Spent several hours today trying to get the unique values in my database into a dropdown selection with Flask WTForms. The Database is MySQL, and I’m actually using SQLAlchemy for the majority of this app, but I’ve been unable to get unique values into the dropdown with SQLAlchemy (only seem to manage to get the string representaion in or the
Flask response.data raise error TypeError: ‘NoneType’ object is not callable
I use an online free api hoster and I have an issue with reponse.data, I use that on @app.after_request with should log path, args and server response, problem is that in console I get: But on discord logger I see the log: The code is : I don’t know how to fix it But once I remove @app.after_request it works
Flask redirect without url params
I have 2 flask app, client and server respectively And I wanna download some files from server by redirecting user directly to the server So basically I want redirect to this route: So I’m write client like this: I wanna get url like: http://ipAddress/api/1.0/conf/myGreatToken But get: http://ipAddress/api/1.0/conf/%7B’token’:%20’myGreatToken’%7D And this doesn’t work. How to redirect without params? Answer It seems like