title: Django REST API get only auth user datas
body: <p>I am new Django, I try make REST API. Now face one issue. I created 2 models Account &amp; Transaction</p>
  <pre><code>class Account(models.Model):
      id = models.UUIDField(default=uuid.uuid4, unique=True,primary_key=True,editable=False)
      user = models.ForeignKey(User,on_delete=models.CASCADE)
      account_name = models.CharField(max_length=100)
  </code></pre>
  <p>Account have ForeignKey with user model</p>
  <pre><code>class Transaction(models.Model):
      id = models.UUIDField(default=uuid.uuid4(),primary_key=True,editable=False)
      account = models.ForeignKey(Account,on_delete=models.CASCADE,related_name='account')
      transaction_no = models.CharField(default=str(uuid.uuid4())[:8],max_length=100)
  </code></pre>
  <p>Transaction have ForeignKey with Account model. then get JWT token &amp; pass on API. In <code>view.py</code> I filtered by requested user</p>
  <pre><code>@api_view(['GET'])
  @permission_classes([IsAuthenticated])
  def getAccount(request,pk):
      account = Account.objects.filter(user=request.user).get(id=pk)
      serializer = AccountSerializer(account, many=False)
      return Response(serializer.data)
  </code></pre>
  <p>now how will filter Transaction only by auth User</p>
  <pre><code>@api_view(['GET'])
  @permission_classes([IsAuthenticated])
  def getTransactions(request,account_id):
      transactions = Transaction.objects.filter(account=account_id)
      serializer = TransactionSerializer(transactions, many=True)
      return Response(serializer.data)
  </code></pre>