diff options
author | Prabhu Ramachandran | 2016-07-09 00:01:14 -0500 |
---|---|---|
committer | GitHub | 2016-07-09 00:01:14 -0500 |
commit | f1f9818a397a954acf3bce134ea278fafca81a08 (patch) | |
tree | db3e2e92cd836b072fe3c3e51d2dc4568a9eddc8 /yaksh/pipeline/user.py | |
parent | 41b4b7607d8ea6856a8b397d4c9e5bb9edea0b77 (diff) | |
parent | 9b66d99965fc8b01b5817159636dcb99e5808ef1 (diff) | |
download | online_test-f1f9818a397a954acf3bce134ea278fafca81a08.tar.gz online_test-f1f9818a397a954acf3bce134ea278fafca81a08.tar.bz2 online_test-f1f9818a397a954acf3bce134ea278fafca81a08.zip |
Merge pull request #112 from prathamesh920/oauth-implementation
oauth implemented
Diffstat (limited to 'yaksh/pipeline/user.py')
-rw-r--r-- | yaksh/pipeline/user.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/yaksh/pipeline/user.py b/yaksh/pipeline/user.py new file mode 100644 index 0000000..4aecd95 --- /dev/null +++ b/yaksh/pipeline/user.py @@ -0,0 +1,8 @@ +from yaksh.models import Profile +#from django.contrib.auth.models import User + +def save_profile(backend, user, response, *args, **kwargs): + if not hasattr(user, 'profile'): + profile = Profile.objects.create(user=user) + profile.roll_number = profile.id + profile.save() |