api_automation_test icon indicating copy to clipboard operation
api_automation_test copied to clipboard

该项目,付费可否手把手教一下呢

Open yeducom opened this issue 4 years ago • 3 comments

就是 的付费,请你 指导一下,这个项目;

yeducom avatar Apr 24 '20 01:04 yeducom

执行出现如下问题:

E:\PycharmProjects\api_automation_test-master>python manage.py makemigrations SystemCheckError: System check identified some issues:

ERRORS: ?: (corsheaders.E013) Origin '*' in CORS_ORIGIN_WHITELIST is missing scheme or netloc HINT: Add a scheme (e.g. https://) or netloc (e.g. example.com).

Chersh-Pan avatar May 21 '20 03:05 Chersh-Pan

你可以参考这个流程解决下 框架部署

pip install -r requirements.txt pip install https://github.com/darklow/django-suit/tarball/v2

进入 api_automation_test/settings.py 配置数据库信息

进入到manage.py 同目录下 执行django初始化流程 python3 manage.py makemigrations python3 manage.py migrate python3 manage.py createsuperuser

切换npm镜像 npm config set registry https://registry.npm.taobao.org 查看当前镜像 npm config get registry

前端vue部署 进入 frontend目录 cd ...../api_automation_test/frontend 安装 npm run build #可能会有报错

cnpm install node-sass

ERROR:Node Sass version 6.0.1 is incompatible with ^4.0.0. 卸载 npm uninstall node-sass

安装 npm install [email protected] 如有报错 重装淘宝镜像 npm install -g cnpm --registry=https://registry.npm.taobao.org

再次安装 npm run build

启动服务 python manage.py runserver 0:80 # 0是本地所有IP地址,80是端口

947612227 avatar Nov 11 '21 06:11 947612227

另外需要将IP地址改为自己的IP /Users/admin/gitclone/github/api_automation_test/frontend/src/api/api.js 将 // export const test = 'http://120.79.232.23:8000'; // export const url = 'http://120.79.232.23'; 注释 或改成自己的IP地址即可,端口要对应自己启动runserver的端口

947612227 avatar Nov 12 '21 07:11 947612227