pallets / flask

The Python micro framework for building web applications.

Home Page:https://flask.palletsprojects.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Application Setup Tutorial doesn't work

ntelo007 opened this issue · comments

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.

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.