flask 学习二,项目布局

Project Layout

1.mikdir flask-tutorial
2. cd flask-tutorial
/home/user/Projects/flask-tutorial
├── flaskr/				#a Python package containing your application code and files
│   ├── __init__.py
│   ├── db.py
│   ├── schema.sql
│   ├── auth.py
│   ├── blog.py
│   ├── templates/
│   │   ├── base.html
│   │   ├── auth/
│   │   │   ├── login.html
│   │   │   └── register.html
│   │   └── blog/
│   │       ├── create.html
│   │       ├── index.html
│   │       └── update.html
│   └── static/
│       └── style.css
├── tests/		#a directory containing test modules.
│   ├── conftest.py
│   ├── data.sql
│   ├── test_factory.py
│   ├── test_db.py
│   ├── test_auth.py
│   └── test_blog.py
├── venv/		# a Python virtual environment where Flask and other dependencies are installed
├── setup.py
└── MANIFEST.in

if you’re using version control, the following files that are generated while running your project should be ignote.

venv/

*.pyc
__pycache__/

instance/

.pytest_cache/
.coverage
htmlcov/

dist/
build/
*.egg-info/

猜你喜欢

转载自blog.csdn.net/weixin_42262889/article/details/89594488
今日推荐