have a url that accepts all characters

后端 未结 3 2076
离开以前
离开以前 2020-12-18 19:57

I want a url that accepts all characters,for example:

(r\'^company/(?P[a-zA-Z]+)/doclist/$\',\'CompanyHub.views.docList\')

for <

3条回答
  •  萌比男神i
    2020-12-18 20:39

    Your code should look like this:

    (ur'^company/(?P.*)/doclist/$','CompanyHub.views.docList')
    

    We need the 'u' at the beginning to tell python that the string accepts unicode characters.

提交回复
热议问题