flask-cli Questions
7
Creating custom commands in flask needs access to the app, which is generally created in app.py like this:
import click
from flask import Flask
app = Flask(__name__)
@app.cli.command("create-use...
Seigler asked 25/7, 2019 at 13:9
2
Solved
I try to use the flask cli to start my application, i.e. flask run. I use the FLASK_APP environment variable to point to my application, i.e. export FLASK_APP=package_name.wsgi:app
In my wsgi.py f...
1
Solved
I want to run some commands from terminal with 'flask' command but it isn't working.
The Following is my project structure-
FlaskUserAuthentication
├── FlaskUserAuthentication
│ ├── API
│ │ ...
Castrate asked 25/11, 2019 at 12:35
1
Solved
I want to register a CLI command that's defined in a separate file from the Flask app factory. This command needs access to app.config. However, accessing current_app.config from the command raises...
Connors asked 13/8, 2018 at 12:13
1
Solved
I have created a custom CLI command in Flask, that I am able to run via flask my_command in the terminal. I want to run this command using PyCharm's debugger.
I created a "Flask server" configurat...
1
Solved
How do you let a Flask CLI command accept an argument?
Flask seems to customise the Click Group object, so this doesn't work:
@app.cli.command()
@app.cli.argument('email')
def user_info(email):
...
Corvine asked 23/6, 2017 at 12:44
1
© 2022 - 2024 — McMap. All rights reserved.