"""
URL configuration for myproject project.

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/4.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),

    path("get/information/", views.getinformation,name='get_information'),
    #post请求，班级名称 'class_name' ，文件 'file'
    #后端会返回一个json文件，当'message' = 1时，是成功建立
    #重复导入名字相同的文件会返回'message' = 0，该班级已经创建

    path("call/students/", views.call_students,name='call_students'),  #点名/提问函数
    #post请求，
    # 班级名称'class_name', 点名人数'num',模式'mode'（1-基础模式，2-得分加倍，3-三五成群,4-六六大顺）
    #后端会返回学生的姓名，学号

    path("update/table/",views.updatetable),  #对数据库中的学生积分和概率的更新函数
    #post请求
    #班级名称'class_name'，本次得分‘point’,该学生的学号'sid',加分模式'style'（1-正常加分，2-加分或扣分*2）

    path("choose/style/",views.choosestyle,name = 'choose_style'),  #骰子
    #post请求  后端直接返回一个1-6之间的随机数

    path("show/information/",views.show_information,name='show_information'),
]
