Skip to content
Advertisement

Tag: flask

flask –app hello run — Error: No such option: –app

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

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 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

Advertisement