1.什么是视图层
简单地说,它用于接收来自路由层的请求,并将相应的响应返回给浏览器
[En]
To put it simply, it is used to receive the request from the routing layer and return the corresponding response to the browser
2.视图层的格式与参数说明
2.1基本格式
from django.http import HttpResponse
def page_2003(request):
html = '<h1>第一个网页</h1>'
return HttpResponse(html)
# 注意需要在主路由文件中引入新创建的视图函数
2.2带有转换器参数的视图函数
```
def test(request, num):