The problem of Model two-layer Associated Foreign Keys in Django

for example, as shown in the code, there are three tables, the city, the area, the house, the city to which the house belongs and the area to which the house belongs. I hope that when entering data in the background, I select the option that the city can automatically generate all areas of the city. But limit_choices_to only has the option of writing dead directly, such as writing 1 with id 1 and writing 2 with id 2, otherwise there will be no data.

is there any way to solve this problem?

from django.db import models


class City(models.Model):
    name = models.CharField(max_length=10)


class Area(models.Model):
    name = models.CharField(max_length=10)
    belong_city = models.ForeignKey(City, on_delete=models.CASCADE)


class House(models.Model):
    name = models.CharField(max_length=50)
    house_belong_city = models.ForeignKey(City, on_delete=models.CASCADE)
    house_belong_area = models.ForeignKey(Area,
                                    on_delete=models.CASCADE,
                                    limit_choices_to={"belong_city": house_belong_city.primary_key})

Mar.14,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea9fcb-1f9e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea9fcb-1f9e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?