结构
1 | ├── __init__.py |
安装
1 | flask |
manage.py
1 | # encoding=utf-8 |
app.py
1 | #encoding=utf-8 |
models.py
1 | #encoding=utf-8 |
layout.html
index.html
1 | {% extends "layout.html" %} |
show.html
1 | {% extends "layout.html" %} |
数据库操作:
1 | $ mysql.server start $ mysql -h localhost -u root -p |
mysql查看表结构命令,如下:
desc 表名;
show columns from 表名;
describe 表名;
show create table 表名;
then run:
➜ testdb python manage.py runserver