python - Django allauth & facebook: Given URL is not allowed by the Application configuration -
i run example the missing django-allauth tutorial login facebook, have error when try install django-allauth scratch:
given url not allowed application configuration
in facebook, site url set http://127.0.0.1:8000/
, works example not app. can error come from?
i don't understand "sites" field in django administration: home › socialaccount › social apps › appname. set example.com default, don't know set here, although works fine example.com example...
just info, here example's main urls.py
from django.conf.urls import patterns, include, url django.contrib import admin admin.autodiscover() urlpatterns = patterns( '', # prevent are-you-sure-you-want-to-logout step on logout (r'^accounts/logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}), url(r'^', include('larb.urls')), url(r'^accounts/', include('allauth.urls')), url(r'^admin/', include(admin.site.urls)), )
and urls.py larb:
from django.conf.urls import patterns, url larb import views urlpatterns = patterns('', url(r'^$', views.index, name='index') )
and unique main urls.py
from django.conf.urls import patterns, include, url django.contrib import admin django.views.generic.base import templateview django.conf.urls.static import static django.contrib.staticfiles.urls import staticfiles_urlpatterns romanesco import settings admin.autodiscover() urlpatterns = patterns('', url(r'^$', 'draw.views.index'), url(r'^accounts/', include('allauth.urls')), url(r'^admin/', include(admin.site.urls)), )
i have noticed difference, in example facebook button links href="/accounts/facebook/login/"
; whereas in default login page (when fails) it's href="javascript:allauth.facebook.login('', 'authenticate', 'login')"
.
if go http://127.0.0.1:8000/accounts/facebook/login/
manually works!
in browser, change http://127.0.0.1:8000/
localhost:8000/
that should fix problem.
still under platform website, change site url http://localhost:8000/
Comments
Post a Comment