http://127.0.0.1:8000/accounts/login/总是重定向到http://127.0.0.1:8000/accounts/profile/并且报告404

这是因为你已经通过django-allauth进行登录了,由于网站判定你已经登录了,

所以很多链接你在浏览器打开的时候,都会自动重定向到http://127.0.0.1:8000/accounts/profile

解决方案:

http://127.0.0.1:8000/accounts/logout/

注销后再次打开

http://127.0.0.1:8000/accounts/login/

就不会自动重定向了

同样的问题还有:

当你通过github登录你自己的django网站后,你会发现重定向到http://127.0.0.1:8000/accounts/profile/

这也是因为"你当前的所有设置都是正确的"

扫描二维码关注公众号,回复: 9570888 查看本文章
发布了717 篇原创文章 · 获赞 324 · 访问量 157万+

猜你喜欢

转载自blog.csdn.net/appleyuchi/article/details/104591632