單項(xiàng)選擇題

對(duì)于這個(gè)url定義:urlpatterns=[path(’<int:question_id>/’,views.detail)],視圖函數(shù)detail該如何拿到url中傳入的question_id?()

A.通過request.url獲取
B.通過視圖函數(shù)參數(shù)獲取
C.通過request.REQUEST獲取
D.通過request.META獲取

微信掃碼免費(fèi)搜題