Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'psa2' into psa2_master_merge
Conflicts: social_auth/__init__.py social_auth/backends/__init__.py social_auth/backends/contrib/github.py social_auth/backends/contrib/linkedin.py social_auth/backends/facebook.py social_auth/backends/google.py social_auth/db/base.py social_auth/db/django_models.py social_auth/tests/facebook.py
- Loading branch information
Showing
108 changed files
with
454 additions
and
9,286 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,26 @@ | ||
from django.http import HttpResponseRedirect | ||
|
||
|
||
def redirect_to_form(*args, **kwargs): | ||
if not kwargs['request'].session.get('saved_username') and \ | ||
kwargs.get('user') is None: | ||
def redirect_to_form(strategy, user=None, *args, **kwargs): | ||
if not strategy.session_get('saved_username') and user is None: | ||
return HttpResponseRedirect('/form/') | ||
|
||
|
||
def username(request, *args, **kwargs): | ||
if kwargs.get('user'): | ||
username = kwargs['user'].username | ||
def username(strategy, user=None, *args, **kwargs): | ||
if user: | ||
username = user.username | ||
else: | ||
username = request.session.get('saved_username') | ||
username = strategy.session_get('saved_username') | ||
return {'username': username} | ||
|
||
|
||
def redirect_to_form2(*args, **kwargs): | ||
if not kwargs['request'].session.get('saved_first_name'): | ||
def redirect_to_form2(strategy, *args, **kwargs): | ||
if strategy.session_get('saved_first_name'): | ||
return HttpResponseRedirect('/form2/') | ||
|
||
|
||
def first_name(request, *args, **kwargs): | ||
if 'saved_first_name' in request.session: | ||
def first_name(strategy, *args, **kwargs): | ||
if strategy.session_get('saved_first_name'): | ||
user = kwargs['user'] | ||
user.first_name = request.session.get('saved_first_name') | ||
user.first_name = strategy.session_get('saved_first_name') | ||
user.save() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
django>=1.2.5 | ||
oauth2>=1.5.167 | ||
python_openid>=2.2 | ||
selenium>=2.29.0 | ||
mock==1.0.1 | ||
python-social-auth>=0.1.10 |
Oops, something went wrong.