Flask (two) build a framework

1. Project creation

PyCharm–File–New Project–Flask–Create
Insert picture description here
Insert picture description here
flask project basic directory, as shown above:
templates: html file storage location
static: static file css and js storage location
views.py: main interface writing files, currently all interfaces are written in Here, but in essence, certain
models.py: object definition
run.py: start-up running file
config.py: configuration file
manager.py: used to start programs and other program tasks

2. Running results

Click run and
Insert picture description here
click http://127.0.0.1:50000, the result is as follows:
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_47542175/article/details/113814015