Update 42.深入模型.md
parent
6632c37223
commit
a90e71fd83
|
@ -376,6 +376,8 @@ Teacher.objects.filter(subject__name__contains='全栈')
|
|||
|
||||
|
||||
def show_teachers(request):
|
||||
try:
|
||||
# 测试的时候要传参数‘sno’,如‘http://localhost:8000/teachers/?sno=1’
|
||||
try:
|
||||
sno = int(request.GET.get('sno'))
|
||||
teachers = []
|
||||
|
|
Loading…
Reference in New Issue