Python——Flask框架——程序的结构

一、项目结构

|-flasky
    |-app  Flask程序一般都保存在这里
        |-templates/
        |-static/
        |main/
            |-__init__.py
            |-errors.py
            |-forms.py
            |-views.py
        |-__init__.py
        |-email.py
        |-models.py
    |-migrations/ 包含数据库迁移的脚本
    |-tests/     单元测试
        |-__init__.py
        |test*.py
    |-venv/   包含Python虚拟环境
    |requirements.txt 列出所有依赖包
    |config.py 存储配置
    |manage.py 用于启动程序

二、config.py程序配置

猜你喜欢

转载自www.cnblogs.com/cxys85/p/10452930.html