Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

ZKLlab/golden-touch-elearning

Repository files navigation

点石成金网络教学平台(开发中)

Build Status Coverage License

环境要求

Python 3.5, 3.6, 3.7

技术栈

前端:Vue

后端:DjangoDjango REST framework

开发环境配置

后端

快速开始

  1. 安装MySQL,创建数据库;
  2. 进入项目文件夹,启动测试服务器:
$ pip3 install --upgrade pipenv
$ pipenv install
$ pipenv shell
(golden-touch-elearning) $ export SECRET_KEY=your_secret_key
(golden-touch-elearning) $ export MYSQL_DB=elearning_dev
(golden-touch-elearning) $ export MYSQL_USER=elearning_dev
(golden-touch-elearning) $ export MYSQL_PASS=your_mysql_password
(golden-touch-elearning) $ export MYSQL_HOST=localhost
(golden-touch-elearning) $ export MYSQL_PORT=3306
(golden-touch-elearning) $ python manage.py makemigrations
(golden-touch-elearning) $ python manage.py migrate
(golden-touch-elearning) $ python manage.py runserver 5000

配置持久化保留

(golden-touch-elearning) $ cp testserver.py mytestserver.py

修改mytestserver.py文件中的配置,之后就可以用mytestserver.py代替manage.py而不用每次export环境变量,如:

(golden-touch-elearning) $ python mytestserver.py makemigrations
(golden-touch-elearning) $ python mytestserver.py migrate
(golden-touch-elearning) $ python mytestserver.py runserver 5000

前端

快速开始

  1. 安装Vue CLI
(golden-touch-elearning) $ npm install -g @vue/cli
# OR
(golden-touch-elearning) $ yarn global add @vue/cli
  1. 配置环境
(golden-touch-elearning) $ cd frontend
(golden-touch-elearning) $ npm install
  1. 启动服务
(golden-touch-elearning) $ npm run serve
# OR
(golden-touch-elearning) $ vue ui