log
This commit is contained in:
parent
4bf77ff3af
commit
4a81a437b5
@ -34,9 +34,11 @@ class YandexAuthView(BaseView):
|
||||
data = info_response.json()
|
||||
yandex_id = data['id']
|
||||
if self.request.user.is_authenticated:
|
||||
print('Got yandex_id', yandex_id, 'writing to db')
|
||||
self.request.user.yandex_id = yandex_id
|
||||
self.request.user.save()
|
||||
else:
|
||||
print('Got yandex_id', yandex_id, 'logging in')
|
||||
user = CustomUser.objects.filter(yandex_id=yandex_id).first()
|
||||
if user is not None:
|
||||
login(self.request, user)
|
||||
|
Loading…
Reference in New Issue
Block a user