首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用django-allauth + dj-rest-auth - Facebook不会出现在Admin面板中

使用django-allauth + dj-rest-auth - Facebook不会出现在Admin面板中
EN

Stack Overflow用户
提问于 2022-01-06 21:12:15
回答 1查看 366关注 0票数 0

我已经开始了一个新的Django项目,我正在使用django-allauth +dj auth,并且根据这个文档:https://dj-rest-auth.readthedocs.io/en/latest/installation.html#social-authentication-optional

我只需要将这个添加到我的settings.py文件中:

代码语言:javascript
复制
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“列入了列表。

出了点问题,但我甚至不知道为什么。

EN

回答 1

Stack Overflow用户

发布于 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重新安装它。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70613669

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档