Done
This commit is contained in:
parent
a26784cd98
commit
39e3859836
|
@ -54,7 +54,10 @@ def authorize_intra42(request):
|
||||||
response = oauth_intra42.intra42.get('v2/me', token=token)
|
response = oauth_intra42.intra42.get('v2/me', token=token)
|
||||||
response = response.json()
|
response = response.json()
|
||||||
intra42_id = response['id']
|
intra42_id = response['id']
|
||||||
|
intra42_campus = response['campus'][0]['name']
|
||||||
|
print(intra42_campus)
|
||||||
request.user.userprofileinfo.intra42_id = intra42_id
|
request.user.userprofileinfo.intra42_id = intra42_id
|
||||||
|
request.user.userprofileinfo.intra42_campus = intra42_campus
|
||||||
request.user.userprofileinfo.save()
|
request.user.userprofileinfo.save()
|
||||||
return redirect('accounts:edit')
|
return redirect('accounts:edit')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue