我正在使用django allauth,最初用户可以通过访问website/profile
来访问其个人资料,urls.py为path('profile/', include('users.urls'))
。后来我决定让用户查看其他用户的个人资料,因此我想确定ID需要将urls.py更改为path(r'^profile/(?P<user_id>[\w-]+)/$', include('users.urls'))
。
事实是,现在,当用户访问个人资料时,它不是像website/profile/user1
这样的简洁干净的URL,而是类似website/%5Eprofile/(%3FP1%5B%5Cw-%5D+)/$
的东西。
这可能不是问题,但id希望在我的网站地址栏中输入一个干净的URL,并认为这可能是我的实现不正确的标志。
谢谢。