]> git.parisson.com Git - django-social-auth.git/commitdiff
Transfer redirect parameter (?next=) into new session. May come handy in our next...
authorJanez Stupar <janez.stupar@gmail.com>
Sun, 11 Mar 2012 23:29:59 +0000 (00:29 +0100)
committerJanez Stupar <janez.stupar@gmail.com>
Sun, 11 Mar 2012 23:29:59 +0000 (00:29 +0100)
social_auth/views.py

index ad92fa26bf41e9c98a22e15ceaa68f938dafe2ed..7790d6a10f9d9ac598909fe80f1206ba08167786 100644 (file)
@@ -166,6 +166,8 @@ def complete_process(request, backend, *args, **kwargs):
             # user.social_user is the used UserSocialAuth instance defined
             # in authenticate process
             social_user = user.social_user
+            if redirect_value:
+                request.session[REDIRECT_FIELD_NAME] = redirect_value or DEFAULT_REDIRECT
 
             if setting('SOCIAL_AUTH_SESSION_EXPIRATION', True):
                 # Set session expiration date if present and not disabled by