Files
order/readme.md
2026-01-09 18:07:01 +08:00

27 lines
700 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Python Flask订餐系统
=====================
## 环境要求
- Linux系统
- Python 3.9+
- MySQL 5.7+
## 启动服务
```bash
# 本地开发环境
export ops_config=local && python manager.py runserver
# 生产环境
export ops_config=production && python manager.py runserver
```
## 数据库配置
数据库连接信息在 `config/base_setting.py``config/production_setting.py` 中配置。
## 生成ORM模型
使用flask-sqlacodegen自动生成模型
```bash
flask-sqlacodegen 'mysql://root:password@host:port/food_db' --outfile "common/models/model.py" --flask
flask-sqlacodegen 'mysql://root:password@host:port/food_db' --tables user --outfile "common/models/user.py" --flask
```