from django.shortcuts import get_object_or_404
from rest_framework import viewsets
from rest_framework.response import Response
from ..models import UserInfo
from .serilizers import UserLoginInfoSerializer


class UserInfoViewById(viewsets.ModelViewSet):
    queryset = UserInfo.objects.all()
    serializer_class = UserLoginInfoSerializer

    def retrieve(self, request, pk=None):
        queryset = UserInfo.objects.all()
        user = get_object_or_404(queryset, username=pk)
        serializer = UserLoginInfoSerializer(user)
        return Response(serializer.data)

3ca37e0ed98573c547a52f3673cec14b62ab0893
<mask token>


class UserInfoViewById(viewsets.ModelViewSet):
    <mask token>
    <mask token>
    <mask token>

<mask token>


class UserInfoViewById(viewsets.ModelViewSet):
    <mask token>
    <mask token>

    def retrieve(self, request, pk=None):
        queryset = UserInfo.objects.all()
        user = get_object_or_404(queryset, username=pk)
        serializer = UserLoginInfoSerializer(user)
        return Response(serializer.data)

<mask token>


class UserInfoViewById(viewsets.ModelViewSet):
    queryset = UserInfo.objects.all()
    serializer_class = UserLoginInfoSerializer

    def retrieve(self, request, pk=None):
        queryset = UserInfo.objects.all()
        user = get_object_or_404(queryset, username=pk)
        serializer = UserLoginInfoSerializer(user)
        return Response(serializer.data)

from django.shortcuts import get_object_or_404
from rest_framework import viewsets
from rest_framework.response import Response
from ..models import UserInfo
from .serilizers import UserLoginInfoSerializer


class UserInfoViewById(viewsets.ModelViewSet):
    queryset = UserInfo.objects.all()
    serializer_class = UserLoginInfoSerializer

    def retrieve(self, request, pk=None):
        queryset = UserInfo.objects.all()
        user = get_object_or_404(queryset, username=pk)
        serializer = UserLoginInfoSerializer(user)
        return Response(serializer.data)
