fromdjango.shortcutsimportrenderfromsitegate.toolboximportsitegate_view@sitegate_view# This also prevents logged in users from accessing our sign in/sign up page.defentrance(request):returnrender(request,'entrance.html',{'title':'Sign in & Sign up'})
Then in your template load sitegate tag library and put sitegate_signup_form & sitegate_signin_form tags
in place where you want a registration and sign in forms to be.
fromsitegate.signin_flows.remotes.googleimportGooglefromsitegate.signin_flows.remotes.yandeximportYandexfromsitegate.toolboximportregister_remotes# We register our remotes.register_remotes(# Register OAuth clients (web application type) beforehand# https://oauth.yandex.ru/client/new# set <your-domain-uri>/rauth/yandex/ as a Callback URLYandex(client_id='<your-client-id-here>'),# https://console.cloud.google.com/apis/credentials/oauthclient# set <your-domain-uri>/rauth/google/ as a Callback URLGoogle(client_id='<your-client-id-here>'),)