Category Hierarchy

如何从Django中的URL中删除空格或任何非字母数字字符?

我的urls.py是这样的。

urlpatterns = [
    url(r'^(P?<query>^\d+:[a-z]+)/show$', views.results, name='results')
]

我想删除("/12:some查询/显示“)这样的查询中是否有空格,并将查询作为ex(”/12: the /show“)

转载请注明出处:http://www.shandongyidao.com/article/20230526/1123174.html