"""djangoProject URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path

from app01 import views

urlpatterns = [
    path('admin/', admin.site.urls),
    # 主页，登录两个页面的URL
    path('', views.index),
    # 登录
    path('login/', views.login),
    # 学生选课页面
    path('stu/index/<int:sid>/', views.student_index, name='student_index'),
    # 已选页面
    path('stu/selected/<int:sid>/', views.student_selected, name='student_selected'),

    # 管理员主页，学生信息查增改删，课程信息查增
    path('manage/homepage/', views.manage_homepage),
    # 学生信息列表
    path('manage/stu/list/', views.manage_student),
    # 学生信息添加
    path('manage/stu/add/', views.add_student),
    # 学生信息编辑
    path('manage/stu/edit/<int:sid>/', views.edit_student),
    # 学生信息删除url
    path('manage/stu/del/<int:sid>/', views.delete_student),
    # 课程列表
    path('manage/course/list/', views.manage_course),
    # 课程添加
    path('manage/course/add/', views.add_course),
    # 课程信息编辑
    path('manage/course/edit/<int:cid>/', views.edit_course),
    # 课程信息删除url
    path('manage/course/del/<int:cid>/', views.delete_course),
    # 选课列表
    path('manage/select/list/', views.manage_select),
    # 删除选课信息url
    path('manage/select/del/<int:id>/', views.delete_select),
]

