我已经开始了一个新的Django项目,我正在使用django-allauth +dj auth,并且根据这个文档:https://dj-rest-auth.readthedocs.io/en/latest/installation.html#social-authentication-optional
我只需要将这个添加到我的settings.py文件中:
INSTALLED_APPS = (
...,
'rest_framework',
'rest_framework.authtoken',
'dj_rest_auth'
...,
'django.contrib.sites',
'allauth',
'allauth.account',
'dj_rest_auth.registration',
...,
'allauth.socialaccount',
'allauth.socialaccount.providers.google',
'allauth.socialaccount.providers.facebook',
'allauth.socialaccount.providers.twitter',
)
SITE_ID = 1现在,在我的管理面板上,我看到了“社交网络”,当我点击提供商时,我只能看到Twitter和Google,而没有看到Facebook。我试着卸载django-allauth和dj-rest。甚至试图用以前的版本安装它们,但仍然一样。
所有在YouTube (或博客)上使用这些软件包并想使用Facebook的人都和我完全一样,他们把"Facebook“列入了列表。

出了点问题,但我甚至不知道为什么。
发布于 2022-08-16 20:59:30
这个解决方案对我有效:
Not found: /accounts/facebook/login in django allauth
你只需要重新安装django-allauth。
用命令pip卸载django-allauth卸载django-allauth
然后再用命令pip install django-allauth重新安装它。
https://stackoverflow.com/questions/70613669
复制相似问题