I want to get data from related foreign-key models, but I am unable to get data from the related model, Please let me know how I can do it. I want to display `name` value from `Model2` table..

here is my `models.py` file...

```
class Customer(models.Model):
    cus_name=models.Charfield(blank=True)

class Model1(models.Model):
    namefield=models.Charfield(blank=True)

class Model2(models.Model):
    name=models.CharField(default=None)
    model1=models.Foreignkey(Model1, related_name='model_one', on_delete=models.CASCADE)
   customer=models.Foreignkey(Customer, related_name='customer_data', on_delete=models.CASCADE)

```

here is my `views.py` file...

```
def display_data(request, id):
     test_display=Model1.objects.filter(pk=id).first()
     return render(request, 'page.html', {'test_display':test_display})

```

here is my `test.html` file where i am displaying `name` from `Model2` table

```
<p>{{test_display.model_one.name}}</p>

```