1
我有這麼長的url,我想匹配?
之後的字符串,並在Class Based View的self.kwargs中使用它。 ?Django正則表達式匹配long url
new_timer/UID = 046F1572564080 &運行時間= 1102 &秒= 30stillrunning = 1個& numstoredtimes = 3個& storedtimes = 13:2-23:32-48:43 &校驗= 71
我嘗試以下它不工作。
Urlpatterns = [
# bunch of awesome urls
url(r'^new_timer/(?P<params>[^/]+)/$',NewTimerView.as_view(),
name='new_timer'),
]
我在做什麼錯?
「的URLconf中搜索對所請求的URL,作爲一個正常的Python字符串這不包括GET或POST參數或域名。名稱。」 https://docs.djangoproject.com/en/1.11/topics/http/urls/#what-the-urlconf-searches-against – kichik