title: Django rest framework get user profile data for logged in user
body: <p>I have created Models UserProfile, serilzers and ModelViewSet like below. From below models I want to fetch loged in User profile details like state, city and adress etc</p>
  <pre><code> class UserProfile(models.Model):
      user= models.OneToOneField(User,on_delete=models.CASCADE,related_name='userprofile');
      state= models.CharField(max_length=200)
      city= models.CharField(max_length=200)
      add1= models.CharField(max_length=200)
      add2= models.CharField(max_length=200)
      postalcode= models.IntegerField()
      country= models.CharField(max_length=200)
  
  
  class UserProfileSerializer(serializers.ModelSerializer):
  
      class Meta:
          model = UserProfile
          fields = ('state','city','country')
  
  
  
  class UserProfileViewSet(viewsets.ModelViewSet):
      queryset=UserProfile.objects.all()
      serializer_class=UserProfileSerializer
      def get(self, request):
          userProfileObj = queryset.objects.filter(user_id=request.user.id)
          serializer = self.get_serializer(userProfileObj)
          return Response(serializer.data)
  </code></pre>
  <p>But for some reason, I am getting all user profile data instead of logged in user data, please let me know where I am doing wrong.</p>