標簽: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