Facing problem with user profile url scheme like example.com/username in django

后端 未结 1 1061
执念已碎
执念已碎 2021-01-15 04:14

In a django app, I need to create twitter user profile urls with following structure like:

  • example.com/
  • example.com
相关标签:
1条回答
  • 2021-01-15 04:51

    I don't see why your URLs aren't working. You can try moving the first pattern to the end, so that other patterns have a chance to match first. The problem you're describing sounds like example.com/user/any-page, the pattern is matching "user/any-page" as the account name. The regex you show wouldn't do that, but maybe your actual code is slightly different?

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