1 Star 2 Fork 0

wu-clan / NinjaXia

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

NinjaXia测试平台

基于 django-ninja 快速开发的一个简单入门级自动化测试平台后端

仓库说明:

    此项目目的是个人练习, 非商业用途, 不提供任何担保, 不提供任何技术支持.

如果你想熟悉此项目, 你也应该会浅使用 django-orm, 还接触过一些 django 基础

知识, 最后你阅读过 django-ninja 文档, 此框架与 django-rest-framework

没有任何关系

技术栈

  • Django 3.2
  • Django-Ninja
  • Python 3.8
  • MySQL
  • HTTPX
  • Redis
  • Apscheduler
  • ......

下载

git clone https://gitee.com/wu_cl/NinjaXia.git

使用

⚠️: 此过程请格外注意端口占用情况, 特别是 8000, 3306, 6379...

1. 传统

  1. 安装所有依赖
    pip install -r requirements.txt
  2. 创建数据库 ninja_xia,选择 utf8mb4 编码
  3. 检查并修改 ninja_xia/settings.py mysql 数据库配置
  4. 数据库迁移
    cd backend
    
    #  生成迁移文件
    python manage.py makemigrations
    
    # 执行迁移
    python manage.py migrate
  5. 百度安装redis客户端, 安装完启动服务
  6. 检查并修改 ninja_xia/settings.py redis 数据库配置
  7. 执行 python manage.py runserver 文件启动服务
  8. 浏览器访问: http://127.0.0.1:8000/v1/docs

2. docker

  1. 在 docker-compose.yml 文件所在目录下执行一键启动命令
    docker-compose up -d --build
  2. 等待命令自动执行完成
  3. 浏览器访问: http://127.0.0.1:8000/v1/docs

创建管理员用户

python manage.py createsuperuser

MIT License Copyright (c) 2022 xiaowu Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

NinjaXia 自动化测试平台后端实现 展开 收起
Python 等 3 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Python
1
https://gitee.com/wu_clan/NinjaXia.git
git@gitee.com:wu_clan/NinjaXia.git
wu_clan
NinjaXia
NinjaXia
master

搜索帮助