diff options
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() |