title: Django rest framework get data based on current userId/token
body: <p>In my model, i have a family table where user are able to enter their family details and store their information. But how do i get/query all the family member based on current userId ?</p>
  
  <p>For eg: userId=1 added 2 family member, mother and father. How do i get these 2 family member based on the query of the current user's userId ?</p>
  
  <p>here is my code :</p>
  
  <p><strong>models</strong></p>
  
  <pre><code>class MyUser(AbstractUser):
      userId = models.AutoField(primary_key=True)
      gender = models.CharField(max_length=6, blank=True, null=True)
      nric = models.CharField(max_length=40, blank=True, null=True)
      birthday = models.DateField(blank=True, null=True)
      birthTime = models.TimeField(blank=True, null=True)
  
  class Family(models.Model):
      userId = models.ForeignKey(MyUser)
      relationship = models.CharField(max_length=100)
      first_name = models.CharField(max_length=50)
      last_name = models.CharField(max_length=50)
      gender = models.CharField(max_length=6, blank=True, null=True)
  </code></pre>
  
  <p><strong>serializers</strong></p>
  
  <pre><code>class MyUserSerializer(serializers.ModelSerializer):
      valid_time_formats = ['%H:%M', '%I:%M%p', '%I:%M %p']
      birthTime = serializers.TimeField(format='%I:%M %p', input_formats=valid_time_formats, allow_null=True, required=False)
  
      class Meta:
          model = MyUser
          fields = ['userId', 'username', 'email', 'first_name', 'last_name', 'gender', 'nric', 'birthday', 'birthTime']
          read_only_fields = ('userId',)
          extra_kwargs = {"password": {"write_only": True}}
  
      def update(self, instance, validated_data):
          for attr, value in validated_data.items():
              if attr == 'password':
                  instance.set_password(value)
              else:
                  setattr(instance, attr, value)
          instance.save()
          return instance
  
  
  class FamilySerializer(serializers.ModelSerializer):
  
      class Meta:
          model = Family
          fields = ('id', 'userId', 'first_name', 'last_name', 'gender', 'relationship')
  </code></pre>
  
  <p><strong>views</strong></p>
  
  <pre><code>class MyUserViewSet(viewsets.ModelViewSet):
      permission_classes = [AllowAny]
      queryset = MyUser.objects.all()
      serializer_class = MyUserSerializer
      filter_backends = (filters.SearchFilter,)
      search_fields = ('=userId', 'username', 'email', 'first_name', 'last_name')
  
  
  class FamilyViewSet(viewsets.ModelViewSet):
      permission_classes = [AllowAny]
      queryset = Family.objects.all()
      serializer_class = FamilySerializer
  
  
  def get_object(self, *args, **kwargs):
      return self.request.user
  
  def perform_update(self, serializer):
      super(CurrentFamilyView, self).perform_update(serializer)
      user = serializer.instance
      if settings.SEND_ACTIVATION_EMAIL and not user.is_active:
          context = {'user': user}
          to = [MyUser(user)]
          email.ActivationEmail(self.request, context).send(to)
  </code></pre>
  
  <p>Can anyone help me with get current user's family </p>