django-allauth: How can I add a Site for my domain? -
i'm new django , i've installed django-allauth.
i followed docs, i'm stuck on post-installation steps:
add site domain, matching settings.site_id (django.contrib.sites app).
for each oauth based provider, add social app (socialaccount app).
fill in site , oauth app credentials obtained provider.
i don't understand part @ all.
i tried register site & socialaccount nothing changes. also, saw had define site id put in settings:
site_id = '1'
please, me this? appreciated.
update
i found tutorial let me go on this. registered app in facebook , obtained app id & secret , established /admin/socialaccount/socialapp/ when ready
page not found (404) request method: request url: myip/accounts/profile/ using urlconf defined in gameproject.urls, django tried these url patterns, in order: ^admin/ ^accounts/ ^ ^signup/$ [name='account_signup'] ^accounts/ ^ ^login/$ [name='account_login'] ^accounts/ ^ ^logout/$ [name='account_logout'] ^accounts/ ^ ^password/change/$ [name='account_change_password'] ^accounts/ ^ ^password/set/$ [name='account_set_password'] ^accounts/ ^ ^inactive/$ [name='account_inactive'] ^accounts/ ^ ^email/$ [name='account_email'] ^accounts/ ^ ^confirm-email/$ [name='account_email_verification_sent'] ^accounts/ ^ ^confirm-email/(?p<key>\w+)/$ [name='account_confirm_email'] ^accounts/ ^ ^confirm_email/(?p<key>\w+)/$ ^accounts/ ^ ^password/reset/$ [name='account_reset_password'] ^accounts/ ^ ^password/reset/done/$ [name='account_reset_password_done'] ^accounts/ ^ ^password/reset/key/(?p<uidb36>[0-9a-za-z]+)-(?p<key>.+)/$ [name='account_reset_password_from_key'] ^accounts/ ^ ^password/reset/key/done/$ [name='account_reset_password_from_key_done'] ^accounts/ ^social/ ^accounts/ ^weibo/ ^accounts/ ^persona/login/$ [name='persona_login'] ^accounts/ ^instagram/ ^accounts/ ^openid/login/$ [name='openid_login'] ^accounts/ ^openid/callback/$ [name='openid_callback'] ^accounts/ ^vimeo/ ^accounts/ ^twitter/ ^accounts/ ^vk/ ^accounts/ ^linkedin/ ^accounts/ ^github/ ^accounts/ ^google/ ^accounts/ ^facebook/ ^accounts/ ^facebook/login/token/$ [name='facebook_login_by_token'] ^accounts/ ^facebook/channel/$ [name='facebook_channel'] ^accounts/ ^angellist/ ^accounts/ ^bitly/ ^accounts/ ^dropbox/ ^accounts/ ^stackexchange/ ^accounts/ ^twitch/ ^accounts/ ^soundcloud/ current url, accounts/profile/, didn't match of these. you're seeing error because have debug = true in django settings file. change false, , django display standard 404 page.
when im trying check in website in myip/accounts/profile/
add site through admin panel. since developing on machine, i've set site "domain name" field set "127.0.0.1:8000" , "display name" shouldn't matter.
your site_id in settings.py needs match actual database id site added through admin panel. can go details of site created through admin panel , @ url id number. mine ended being "5"(i recreated several sites trying work).
create social application through admin panel. pretty easy need setup application through provider (e.g. create facebook app on facebooks website) , use secret code , app id give fill out django form. sure add django site created in step 1 social application making in step.
note: did , kept getting 404. due me being logged in admin, thus, url '/accounts/login' decided logged in , redirected '/accounts/profile' didn't exist yet. easy fix if run clear cookies django page , visit '/accounts/login' again. post in comments if need help.
Comments
Post a Comment