记录在 Testerhome 的第一篇帖子,排版可能不是很好,望见谅
首先感谢大佬做的平台 @debugtalk @yinquanwang ,原文地址 [https://testerhome.com/topics/12151]
git clone https://github.com/HttpRunner/HttpRunnerManager.git
docker run -p 3306:3306 --name mysql -v /opt/data/mysql/logs:/logs -v /opt/data/mysql:/mysql_data -e MYSQL_ROOT_PASSWORD=123456 -d mysql:5.7
mysql -h 127.0.0.1 -u root -p
CREATE DATABASE HttpRunner DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
pip3 install -r requirements.txt
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',
}
}
python3 manage.py makemigrations ApiManager
python3 manage.py migrate
python3 manage.py runserver 8000