Pycharm easily creates Flask projects

One, create flask project

Open the Pycharm file, choose to create a new project, and then a dialog box pops up. We can see that there are many types of projects such as Flask, Django, etc., and we choose to generate Flask projects.
Insert picture description here
The generated flask project is as follows:
Insert picture description here
app.py is the entry program, there is also a static static directory, templates is the location where the templates are stored.

Second, start the flask service

There is a run on Pycharm. We can choose run to start the Flask service. The port 5000 is opened by default.
Insert picture description here
Three, client interface operation

Open the browser and enter http://localhost:5000 to check the operation status of the website. The page outputs the Hello World we returned!
Insert picture description here

Guess you like

Origin blog.csdn.net/baidu_24752135/article/details/114440741