You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
EduSystem/README.md

64 lines
1.0 KiB

1 year ago
# 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