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:網站匹配的查詢不存在 –