标签:def rgba col views div 返回值 int django 传参
分组
# url.py urlpatterns = [ .... # url上捕获的参数 会按照位置参数方式传参给试图函数 url(r‘^blog/([0-9]{4}/\d{2})/$‘, views.blog), ] # view.py def blog(request, year, month): print(year, type(year)) print(month, type(month)) return HttpResponse(‘blog‘) # 请求后的返回值 [28/Jul/2021 08:04:59] "GET /blog/2020/03/ HTTP/1.1" 200 4 2020 <class ‘str‘> 03 <class ‘str‘>
标签:def rgba col views div 返回值 int django 传参
原文地址:https://www.cnblogs.com/Star-Haitian/p/15071025.html