title: Make Django Rest Api User Specific (get_queryset)
body: <p>I want to make a Django rest api that is user specific so that I do /username at the end of the url.</p>
  
  <p>Models:</p>
  
  <pre><code>class UserProfile(models.Model):
  user = models.OneToOneField(User, on_delete=models.CASCADE)
  age = models.IntegerField()
  description = models.CharField(max_length=300)
  
  class Meta:
      verbose_name_plural = 'User Profiles'
  
  def __str__(self):
      return self.user.username
  
  @receiver(post_save, sender=User)
  def create_user_data(sender, update_fields, created, instance, **kwargs):
  if created:
      user  = instance
      profile = UserProfile.objects.create(user=user, age=18, description='No Description')
  
  class Notes(models.Model):
  note = models.CharField(max_length=1000)
  parent_user = models.OneToOneField(UserProfile, blank=True, on_delete=models.CASCADE)
  
  class Meta:
      verbose_name_plural = 'Notes'
  
  def __str__(self):
      return self.note
  </code></pre>
  
  <p>Serializers:</p>
  
  <pre><code>class NoteSerializer(serializers.ModelSerializer):
  class Meta:
      model = Notes
      fields = ('id', 'note', 'parent_user')
  </code></pre>
  
  <p>urls:</p>
  
  <pre><code>router = routers.DefaultRouter()
  router.register('notes', views.UserNoteView)
  
  urlpatterns = [
      path('', include(router.urls)),
  ]
  </code></pre>
  
  <p>views:</p>
  
  <pre><code>class NoteView(viewsets.ModelViewSet):
  http_method_names = ['get', 'post', 'put', 'delete', 'patch']
  queryset = Notes.objects.all()
  serializer_class = NoteSerializer
  
  class UserNoteView(NoteView):
  def get_queryset(self):
      return self.request.parent_user.Notes.all()
  </code></pre>
  
  <p>My problem is that I can't do for example /William which is the name of my user, and user profile. Someone that knows this must be able to help!</p>