0
我正在使用django-rest-auth作为与android作为前端的facebook集成。我遵循了集成django-rest-auth中提到的所有步骤。“django-rest-auth”DoesNotExist:不存在网站匹配查询
我只有一个网站,并设置SITE_ID 1
我还设置客户端ID和我的应用程序的秘密ID,并确保我已经选择我的网站。
下面是截图
下面是我的代码
INSTALLED_APPS = [
'rest_auth',
'django.contrib.sites',
'allauth',
'allauth.account',
'allauth.socialaccount',
'allauth.socialaccount.providers.facebook',
]
我的自定义登录串行
REST_AUTH_SERIALIZERS = {
'LOGIN_SERIALIZER': 'cut_veggie_user.serializers.NormalUserSerializer',
}
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
'allauth.account.auth_backends.AuthenticationBackend',
)
SITE_ID = 1
在网址我也包括了FacebookLogin
urlpatterns = [
url(r'^rest-auth/facebook/$', FacebookLogin.as_view(), name='fb_login'),
]
有谁能告诉我我错过了什么吗?
请描述错误或发出您正在运行到 – Dap
这是错误我得到的,DoesNotExist:网站匹配的查询不存在 –