文章目录第一个页面1.url2.views3.html第二个页面1.urls和views2.html
本节课要做这样的页面:
主页展示每个班级信息,点击详情超链接可至第二个页面,展示该班级里具体学生的数据
第一个页面
1.url
定义该页面的后缀
/student/showall/
path('showall/', views.showall_view)
关联新views,shit+alt+enter
2.views
进入views,关联model班级Clazz全部,传递到showall.html
def showall_view(request):
cls = Clazz.obj