update ReadME.md

master
bettleChen 1 year ago
parent ea6a73aee3
commit 08b97276a5

Binary file not shown.

@ -1,2 +1,63 @@
# EduSystem
### 使用手册
1. 创建数据库
```sql
create database edu_sys;
```
2. 修改`EduSystemServer/setting.py`文件中的配置
```python
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': "edu_sys",
'USER': "用户名",
'PASSWORD': "密码",
'HOST': "localhost",
'PORT': 3306,
}
}
```
3. 迁移模型至数据库
1. 生成迁移文件
```shell
python manage.py makemigrations Eduadmin
python manage.py makemigrations Student
python manage.py makemigrations teacher
python manage.py makemigrations course
```
2. 迁移
```python
python manage.py migrate
```
4. 创建admin用户
```python
python manage.py createsuperuser
# 输入用户名,邮箱,密码
```
5. 运行程序
```python
python manage.py runserver
```
### 访问网址
管理端http://127.0.0.1:8000/admin/
用户端http://127.0.0.1:8000

Loading…
Cancel
Save