django-allauth returns error “Reverse … with arguments '()' and keyword arguments '{}' not found”

佐手、 提交于 2019-12-06 14:51:55

Let me present this answer with some debugging tips that hopefully will prove useful in the future.

When you see that particular Django error, it almost always means that something is wrong with your urls.py. The odds that such a widely-used package has a bug affecting such basic usage is pretty remote, so digging into the source code was probably wasted effort in this case.

You said that you installed django-allauth "exactly as per tutorials", but when I compare your setup to the documentation I see this difference:

Documentation: (r'^accounts/', include('allauth.urls'))

You: (r'^accounts/', include('allauth.urls', namespace='allauth'))

So it appears that something is wrong with your use of namespacing.

A quick Google search pulls up this issue, where the package author explains that namespacing isn't supported.

So if you get rid of the namespace argument, everything should work as expected.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!