Application Setup Tutorial doesn't work
ntelo007 opened this issue · 1 comments
ntelo007 commented
Description
If you try to run the Flask application by following this tutorial it doesn't work: https://flask.palletsprojects.com/en/3.0.x/tutorial/factory/
Suggested solution
In my personal project, I created an app.py file and in there I pasted the following code:
from flaskr import create_app
app = create_app()
if __name__ == '__main__':
app.run()
I run this file and the Flask app can initialize.
davidism commented
I can't reproduce this issue with the information provided. The tutorial code is included in the repo if you want to compare if you missed or typoed something. It runs fine for me. There's no need to create the script you've shown, the flask
command shown in the tutorial already does that for you.