[英]django-allauth Uncaught ReferenceError
我無法理解為什么我會得到:
未捕獲的ReferenceError:未定義allauth
...點擊Facebook鏈接時: https : //obscure-harbor-7751.herokuapp.com/accounts/signup/在Heroku上托管。 沒有相關的javascript呈現給頁面,但我不知道allauth將從哪里處理。
我很確定所有相關設置都是正確的(粘貼在下面)。 我認為它之前工作並且不知何故停止了工作(可能是因為部署時需要更新)。 我正在使用django-cookiecutter。
任何人都可以建議問題可能是什么? 我嘗試了很多東西,並在網上尋找一個實時的例子來看看我應該期待什么樣的js但卻找不到。
請幫忙!
謝謝,
相關設置:
TEMPLATE_CONTEXT_PROCESSORS = (
'django.contrib.auth.context_processors.auth',
'django.core.context_processors.debug',
'django.core.context_processors.i18n',
'django.core.context_processors.media',
'django.core.context_processors.static',
'django.core.context_processors.tz',
'django.contrib.messages.context_processors.messages',
'django.core.context_processors.request',
"allauth.account.context_processors.account",
"allauth.socialaccount.context_processors.socialaccount",
# Your stuff: custom template context processers go here
)
AUTHENTICATION_BACKENDS = (
"django.contrib.auth.backends.ModelBackend",
"allauth.account.auth_backends.AuthenticationBackend",
)
INSTALLED_APPS += (
# Needs to come last for now because of a weird edge case between
# South and allauth
'allauth', # registration
'allauth.account', # registration
'allauth.socialaccount', # registration
'allauth.socialaccount.providers.facebook',
)
使用以下可能更好:
{% providers_media_js %}
參考: http : //django-allauth.readthedocs.org/en/latest/templates.html
我需要補充一下:
{% include "socialaccount/snippets/login_extra.html" %}
到templates/account/signup.html
,以便javascript出現在頁面上。 我希望被包括在內。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.