From 08b97276a51d97d02516f9f07ff9e48f6e083e58 Mon Sep 17 00:00:00 2001 From: bettleChen <2207153529@qq.com> Date: Wed, 13 Sep 2023 16:31:42 +0800 Subject: [PATCH] update ReadME.md --- EduSystemServer/requirements.txt | Bin 0 -> 214 bytes README.md | 61 +++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 EduSystemServer/requirements.txt diff --git a/EduSystemServer/requirements.txt b/EduSystemServer/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..797188a5707e3c543e7d95ef717b15fcf3d9e110 GIT binary patch literal 214 zcmZXOJqyA>5JX=s_)|`Dr(k7gl`2KRI(U9XVju~Ke_oy4LIQH^vCGUG=JVdu((vFy z&rWa6isTbnvLMg&z)`M&k-(LcxUAo9BR8U=rugFqxke_=@-}q3o}P18POE)#-q<)x bD7mSZwM(vBGxH?RuXs^%p#HI2*RAsxbbTQH literal 0 HcmV?d00001 diff --git a/README.md b/README.md index c17a1ee..552a89c 100644 --- a/README.md +++ b/README.md @@ -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 +