0cfaf8c89467f9309314199ac5ec241c71c4af6b
【服务层新范式】system/position 作为标杆: - service 函数改「入参数据/出参数据」:get_position_page(params)->dict、 add_position(data)/update_position(data)/update_position_status(data)->None、 delete_positions(ids)->int - 业务失败 raise BizError(不再 return R.failed),由全局处理器转 R.failed - get_info 委托 PositionRepository(新增 repository.py,继承 BaseRepository) - router 负责取参(query args / parse_request_body)与 R 包装 【单元测试】tests/unit/test_modules/test_position_service.py: - 纯函数(_build_page_data)、BizError 契约(空数据/空ID/无效ID)、 mock 批量删除(ID 解析验证)——无需数据库即可测试 - conftest flask_app fixture 增加 SECRET_KEY + 关闭 CSRF 【验收】12 passed(5 响应 + 7 position);应用启动;flake8 零告警; position 路由 401 拦截正常。服务层测试化范式验证可行 Co-Authored-By: Claude <noreply@anthropic.com>
DjangoAdmin_Flask_EleVue
Description
一款 Python 语言基于Flask、Vue2.x、ElementUI、MySQL等框架精心打造的一款模块化、高性能、企业级的敏捷开发框架,本着简化开发、提升开发效率的初衷触发,框架自研了一套个性化的组件,实现了可插拔的组件式开发方式:单图上传、多图上传、下拉选择、开关按钮、单选按钮、多选按钮、图片裁剪等等一系列个性化、轻量级的组件,是一款真正意义上实现组件化开发的敏捷开发框架。
Software Architecture
Software architecture description
Installation
- xxxx
- xxxx
- xxxx
Instructions
- xxxx
- xxxx
- xxxx
Contribution
- Fork the repository
- Create Feat_xxx branch
- Commit your code
- Create Pull Request
Gitee Feature
- You can use Readme_XXX.md to support different languages, such as Readme_en.md, Readme_zh.md
- Gitee blog blog.gitee.com
- Explore open source project https://gitee.com/explore
- The most valuable open source project GVP
- The manual of Gitee https://gitee.com/help
- The most popular members https://gitee.com/gitee-stars/
Languages
Python
47.8%
Vue
24.9%
CSS
11.4%
TypeScript
11%
Go Template
2.6%
Other
2.1%