django url pattern for

后端 未结 4 2016
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-05 14:26

In Django what is the url pattern I need to use to handle urlencode characters such as %20

I am using (?P[\\w]+) but this only handles alpha

4条回答
  •  天涯浪人
    2020-12-05 14:51

    The best way to do that and allow others chars is using '\s' that is any spaces, tabs and new lines

    (?P[\w\s]+)
    

提交回复
热议问题