title: Nested Relationship in Django Doesn't Work
body: <p>These are my models here:</p>
  
  <pre><code>class Site(models.Model):
      siteID = models.CharField(max_length=255, primary_key=True)
  
  class EndDevice(models.Model):
      class Meta:
          unique_together = ("edevID", "siteID")
  
      edevID = models.CharField(max_length=255) 
      siteID = models.ForeignKey(Site, related_name='endDeviceList', on_delete=models.CASCADE)
      deviceCategory = models.BigIntegerField()
  </code></pre>
  
  <p>This is my serilaizer:</p>
  
  <pre><code>class DeviceSerializer(serializers.ModelSerializer):
      class Meta:
          model = EndDevice
          fields = ("edevID", "siteID", "deviceCategory")
  class SiteSerializer(serializers.ModelSerializer):
      endDeviceList = DeviceSerializer(many = True, read_only=True)
  
      class Meta:
          model = Site
          fields = ("siteID", "endDeviceList")
  </code></pre>
  
  <p>This is my view:</p>
  
  <pre><code>class IndividualSite(generics.RetrieveUpdateDestroyAPIView):
      '''
      PUT site/{siteID}/
      GET site/{siteID}/
      DELETE site/{siteID}/
      '''
      queryset = EndDevice.objects.all()
      serializer_class = SiteSerializer
  </code></pre>
  
  <p>I am trying to get/put/delete results using this class and I am trying to get all the EndDevice instances which have same siteID. But my serialzer only shows the siteID and doesn't show the endDeviceList (which should have the instants of the model EndDevice)</p>
  
  <p>The problem is quite similar to this link:<a href="https://stackoverflow.com/questions/41521129/django-rest-farmework-nested-relationships">django rest-farmework nested relationships</a>.</p>
  
  <p>I have been trying different ways to serialize the objects, I think this is probably the smartest way, but have been really unsucccessful. Any help will be appreciated.
  The urls.py:
  urlpatterns = [</p>
  
  <pre><code>urlpatterns = [path('site/&lt;str:pk&gt;/', IndividualSite.as_view(), name = "get-site"),]
  </code></pre>
  
  <p>And it is connected to the main urls.</p>