Question

I'm using django-social-auth with Django 1.3.1 under Python 2.7.1. I've been looking all over the place and I can't quite figure out how to use a custom redirection url for Twitter Authentication (or other providers).

I've read that I need to use this template tag in my html template to build the link to initiate the process:

{% url socialauth_begin 'twitter' %}

This works relatively fine using the value in my settings.py file for the LOGIN_REDIRECT_URL (although, see my question here: Twitter takes users to /en/logged-in/ regardless of my settings) However, in this particular case, I need to redirect the user to a special url upon return.

I've read in other places that I need to pass the variable 'next' with my redirect value to the template or as a parameter on the twitter auth url. How is this done? My template is loaded as a HttpResponse, so, while I can certainly pass it template values, it isn't clear how I can use these in the above template tag.

Sorry for this basic question.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top