blob: 4aecd95c4e8bfcec16916ffb521ddfc6c53962e3 (
plain)
1
2
3
4
5
6
7
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()
|