- MAC 自带 python2.7,另行下载 python3.6 进行双 python 环境部署,python3.7 不推荐
- pip3 install httprunner
- mysql 安装(推荐 5.7+),mysql 客户端(选装),mysqlclient
- python3 -m pip install pymysql
- git clone https://github.com/HttpRunner/HttpRunnerManager.git
- pip3 install -r requirements.txt
- vim /usr/lib/python3.6.0/site-packages/django/db/backends/mysql/base.py
在 from django.utils.safestring import SafeBytest,SafeTest 下添加下面两条
import pymysql
pymysql.install_as_MySQLdb()
- 修改 DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'HttpRunner',
'USER': 'root',
'PASSWORD': '123456',
'HOST': '127.0.0.1',
'PORT': '3306',
}
}
BROKER_URL = 'amqp://guest:guest@127.0.0.1:5672//'
- python3 manage.py makemigrations ApiManager
python3 manage.py migrate
- python3 manage.py runserver 8000
- http://127.0.0.1:8000/api/register
- 至此系统已经可以正常访问和使用了,邮件系统另行更新。
↙↙↙阅读原文可查看相关链接,并与作者交流