Do anyone know how do use javascript to redirect user login using Google Accounts?
I know there is "users.create_login_url(self.request.path)
" but how do that integrated to "`window.location"
Or there is alternative??
Do anyone know how do use javascript to redirect user login using Google Accounts?
I know there is "users.create_login_url(self.request.path)
" but how do that integrated to "`window.location"
Or there is alternative??
You should be able to pass the string that is created by *users.create_login_url(self.request.path)* to your template as a template variable, and then the template variable can be inserted into your Javascript with double curly braces (if you are using the bundled Django templates):
window.location = {{ authention_url }}
where authentication_url is the template variable that you created in your RequestHandler.