#导入flaskfrom flask import Flask#创建应用 app = Flask(__name__) #创建根路径视图 @app.route('/') def hello_world(): return 'Hello World!' if __name__ == '__main__': app.run()
cd mysite
当前目录下会生成mysite的工程,目录结构如下:
python manage.py runserver 8080