From e2badf0916bbda109c24189d3c29600fb66a29ec Mon Sep 17 00:00:00 2001 From: bettleChen <2207153529@qq.com> Date: Wed, 6 Sep 2023 09:16:49 +0800 Subject: [PATCH] create admin,student,teacher,course apps --- EduSystemServer/Student/__init__.py | 0 EduSystemServer/Student/admin.py | 3 +++ EduSystemServer/Student/apps.py | 5 +++++ EduSystemServer/Student/migrations/__init__.py | 0 EduSystemServer/Student/models.py | 3 +++ EduSystemServer/Student/tests.py | 3 +++ EduSystemServer/Student/views.py | 3 +++ EduSystemServer/admin/__init__.py | 0 EduSystemServer/admin/admin.py | 3 +++ EduSystemServer/admin/apps.py | 5 +++++ EduSystemServer/admin/migrations/__init__.py | 0 EduSystemServer/admin/models.py | 3 +++ EduSystemServer/admin/tests.py | 3 +++ EduSystemServer/admin/views.py | 3 +++ EduSystemServer/course/__init__.py | 0 EduSystemServer/course/admin.py | 3 +++ EduSystemServer/course/apps.py | 5 +++++ EduSystemServer/course/migrations/__init__.py | 0 EduSystemServer/course/models.py | 10 ++++++++++ EduSystemServer/course/tests.py | 3 +++ EduSystemServer/course/views.py | 3 +++ EduSystemServer/teacher/__init__.py | 0 EduSystemServer/teacher/admin.py | 3 +++ EduSystemServer/teacher/apps.py | 5 +++++ EduSystemServer/teacher/migrations/__init__.py | 0 EduSystemServer/teacher/models.py | 6 ++++++ EduSystemServer/teacher/tests.py | 3 +++ EduSystemServer/teacher/views.py | 3 +++ 28 files changed, 78 insertions(+) create mode 100644 EduSystemServer/Student/__init__.py create mode 100644 EduSystemServer/Student/admin.py create mode 100644 EduSystemServer/Student/apps.py create mode 100644 EduSystemServer/Student/migrations/__init__.py create mode 100644 EduSystemServer/Student/models.py create mode 100644 EduSystemServer/Student/tests.py create mode 100644 EduSystemServer/Student/views.py create mode 100644 EduSystemServer/admin/__init__.py create mode 100644 EduSystemServer/admin/admin.py create mode 100644 EduSystemServer/admin/apps.py create mode 100644 EduSystemServer/admin/migrations/__init__.py create mode 100644 EduSystemServer/admin/models.py create mode 100644 EduSystemServer/admin/tests.py create mode 100644 EduSystemServer/admin/views.py create mode 100644 EduSystemServer/course/__init__.py create mode 100644 EduSystemServer/course/admin.py create mode 100644 EduSystemServer/course/apps.py create mode 100644 EduSystemServer/course/migrations/__init__.py create mode 100644 EduSystemServer/course/models.py create mode 100644 EduSystemServer/course/tests.py create mode 100644 EduSystemServer/course/views.py create mode 100644 EduSystemServer/teacher/__init__.py create mode 100644 EduSystemServer/teacher/admin.py create mode 100644 EduSystemServer/teacher/apps.py create mode 100644 EduSystemServer/teacher/migrations/__init__.py create mode 100644 EduSystemServer/teacher/models.py create mode 100644 EduSystemServer/teacher/tests.py create mode 100644 EduSystemServer/teacher/views.py diff --git a/EduSystemServer/Student/__init__.py b/EduSystemServer/Student/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/EduSystemServer/Student/admin.py b/EduSystemServer/Student/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/EduSystemServer/Student/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/EduSystemServer/Student/apps.py b/EduSystemServer/Student/apps.py new file mode 100644 index 0000000..cc2eb6f --- /dev/null +++ b/EduSystemServer/Student/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class StudentConfig(AppConfig): + name = 'Student' diff --git a/EduSystemServer/Student/migrations/__init__.py b/EduSystemServer/Student/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/EduSystemServer/Student/models.py b/EduSystemServer/Student/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/EduSystemServer/Student/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/EduSystemServer/Student/tests.py b/EduSystemServer/Student/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/EduSystemServer/Student/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/EduSystemServer/Student/views.py b/EduSystemServer/Student/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/EduSystemServer/Student/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/EduSystemServer/admin/__init__.py b/EduSystemServer/admin/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/EduSystemServer/admin/admin.py b/EduSystemServer/admin/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/EduSystemServer/admin/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/EduSystemServer/admin/apps.py b/EduSystemServer/admin/apps.py new file mode 100644 index 0000000..5bbf122 --- /dev/null +++ b/EduSystemServer/admin/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class AdminConfig(AppConfig): + name = 'admin' diff --git a/EduSystemServer/admin/migrations/__init__.py b/EduSystemServer/admin/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/EduSystemServer/admin/models.py b/EduSystemServer/admin/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/EduSystemServer/admin/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/EduSystemServer/admin/tests.py b/EduSystemServer/admin/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/EduSystemServer/admin/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/EduSystemServer/admin/views.py b/EduSystemServer/admin/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/EduSystemServer/admin/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/EduSystemServer/course/__init__.py b/EduSystemServer/course/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/EduSystemServer/course/admin.py b/EduSystemServer/course/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/EduSystemServer/course/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/EduSystemServer/course/apps.py b/EduSystemServer/course/apps.py new file mode 100644 index 0000000..9e578cc --- /dev/null +++ b/EduSystemServer/course/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class CourseConfig(AppConfig): + name = 'course' diff --git a/EduSystemServer/course/migrations/__init__.py b/EduSystemServer/course/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/EduSystemServer/course/models.py b/EduSystemServer/course/models.py new file mode 100644 index 0000000..28bc79f --- /dev/null +++ b/EduSystemServer/course/models.py @@ -0,0 +1,10 @@ +from django.db import models + + +# Create your models here. +class Course(models.Model): + cid = models.AutoField(primary_key=True, verbose_name="课程编号") + c_name = models.CharField(max_length=255, verbose_name="课程名称") + type = models.CharField(max_length=128, verbose_name="课程类型") + credit = models.IntegerField(verbose_name="课程学分") + tid = models.ForeignKey(to="teacher", to_field="tid", on_delete="") \ No newline at end of file diff --git a/EduSystemServer/course/tests.py b/EduSystemServer/course/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/EduSystemServer/course/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/EduSystemServer/course/views.py b/EduSystemServer/course/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/EduSystemServer/course/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/EduSystemServer/teacher/__init__.py b/EduSystemServer/teacher/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/EduSystemServer/teacher/admin.py b/EduSystemServer/teacher/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/EduSystemServer/teacher/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/EduSystemServer/teacher/apps.py b/EduSystemServer/teacher/apps.py new file mode 100644 index 0000000..0d48caa --- /dev/null +++ b/EduSystemServer/teacher/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class TeacherConfig(AppConfig): + name = 'teacher' diff --git a/EduSystemServer/teacher/migrations/__init__.py b/EduSystemServer/teacher/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/EduSystemServer/teacher/models.py b/EduSystemServer/teacher/models.py new file mode 100644 index 0000000..22dcafc --- /dev/null +++ b/EduSystemServer/teacher/models.py @@ -0,0 +1,6 @@ +from django.db import models + + +# Create your models here. +class Teacher(models.Model): + tid = models.AutoField(primary_key=True, verbose_name="教师编号") \ No newline at end of file diff --git a/EduSystemServer/teacher/tests.py b/EduSystemServer/teacher/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/EduSystemServer/teacher/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/EduSystemServer/teacher/views.py b/EduSystemServer/teacher/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/EduSystemServer/teacher/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here.