Заливка
This commit is contained in:
1 parent
e674cf39e8
commit
31914ad375
20 files changed
+62
-939
No files matched your search
@@ -89,8 +89,7 @@ class CustomAuth(ModelBackend):
|
||||
homeuser.last_login=user.last_login
|
||||
user.id=homeuser.id
|
||||
homeuser.userinfo = user
|
||||
# print("OOOOOOOOOOOOOOOOOOOO")
|
||||
# print(homeuser)
|
||||
|
||||
return homeuser
|
||||
|
||||
# except Exception as e:
|
||||
|
||||
@@ -15,7 +15,6 @@ class UserJSONRenderer(JSONRenderer):
|
||||
if token is not None and isinstance(token, bytes):
|
||||
# Как говорится выше, декодирует token если он имеет тип bytes.
|
||||
data['token'] = token.decode('utf-8')
|
||||
# print(data)
|
||||
# Наконец, мы можем отобразить наши данные в простанстве имен 'user'.
|
||||
return json.dumps({
|
||||
'user': data,
|
||||
|
||||
@@ -76,7 +76,7 @@ class getuserAPIView(APIView):
|
||||
dt=datetime.now()
|
||||
queryset = DictEmployee.objects.get(login=request.query_params.get('userlogin'))
|
||||
r=CardUserSerializer(queryset).data
|
||||
print(datetime.now()-dt)
|
||||
|
||||
|
||||
return Response(CardUserSerializer(queryset).data)
|
||||
|
||||
Reference in new issue
Block a user