如果你能得到这种形式的网址:网址中的非典型网址?
http://host/m,2,o,12,s,9508406-wure-toieut-oiewu-toewiu-toerwupto-iuewoptiuewop-te/
在网址我有:
url(r'^m,(\d+),o,(?P<itemId>\d+),s,(\s+)/$', show_item_by_id),
,但是这是行不通的。错误是:
Using the URLconf defined in portal.urls, Django tried these URL patterns, in this order:
...
^m,(\d+),o,(?P<itemId>\d+),s,(\s+)/$
...
如何写?
第一个问题是,你的正则表达式包含*** ***,你的url包含*** ***。如果之后仍然有问题,请提供错误信息 –
不,我写错误,url:http:// host/m,2,o,12,s,9508406-wure-toieut-oiewu-toewiu-toerwupto- iuewoptiuewop-te/ – Nips