My Django URLs not picking up dashes

后端 未结 1 687
北荒
北荒 2021-02-03 21:13

Im trying to work out a url that will match domain.com\\about-us\\ & domain.com\\home\\

I have a url regex:

^(?P\\w+)/$
<
1条回答
  •  伪装坚强ぢ
    2021-02-03 22:06

    Try: ^(?P[-\w]+)/$

    [-\w] will accept a-z 1-9 and dash

    0 讨论(0)
提交回复
热议问题