Hi I have two models as below

```
class IndexMaster(models.Model):
    index_id = models.IntegerField(primary_key=True)
    index_name = models.CharField(max_length=100)
    index_on = models.CharField(max_length=10)
    index_type = models.CharField(max_length=20)

    def __str__(self):
        return self.index_id

class Meta:
    managed = True
    db_table = 'index_master'

class IndexData(models.Model):
    index = models.ForeignKey(IndexMaster, on_delete=models.CASCADE)
    lifetime_high = models.FloatField()
    lifetime_low = models.FloatField()
    yearly_high = models.FloatField()
    yearly_low = models.FloatField()
    yesterdays_close = models.FloatField()
    day_high = models.FloatField()
    day_low = models.FloatField()
    todays_open = models.FloatField()
    lastvalue = models.FloatField()
    change = models.FloatField()
    percentchange = models.FloatField()

    class Meta:
        managed = True
        db_table = 'index_data'

```

My serialiser.py looks like this

```
from rest_framework import serializers

from .models import IndexData

class IndexSerializer(serializers.ModelSerializer):

    class Meta:

        model = IndexData
        fields = ['index' ,'day_high', 'day_low', 'lastvalue', 'change', 'percentchange']

    def to_representation(self, instance):
        ret = super(IndexSerializer, self).to_representation(instance)

        return ret

```

and views.py is like

```
class IndexList(generics.ListAPIView):
    queryset = IndexData.objects.all()

    serializer_class = IndexSerializer
    permission_classes = [permissions.IsAuthenticatedOrReadOnly]

    def get_queryset(self):
        query_params = self.request.query_params
        indexID = query_params.get('index_id', None)

        Q1 = Q(index_id = indexID)

        return IndexData.objects.filter(Q1)

```

the issue is when I hit the url to get the JSON I get the following response

```
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "index": 3.0,
            "day_high": 8867.2,
            "day_low": 8725.25,
            "lastvalue": 8746.85,
            "change": -97.95,
            "percentchange": -1.1
        }
    ]
}

```

what I want is to include index\_name, index\_on and index\_type from IndexMaster model..
How do I achieve this?
The JSON response that I want is

```
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "index": 3.0,
            "index_name": "XXXX",
            "index_on": "XXXX",
            "index_type": "XXXX",
            "day_high": 8867.2,
            "day_low": 8725.25,
            "lastvalue": 8746.85,
            "change": -97.95,
            "percentchange": -1.1
        }
    ]
}

```

Where XXXX gets replaced by the actual values coming from IndexMaster