from django.db import models class NationalRegion(models.Model): name = models.CharField(max_length=255) nuts_code = models.CharField(max_length=255) def __str__(self): return self.name class County(models.Model): name = models.CharField(max_length=255) code = models.CharField(max_length=255) nuts_code = models.CharField(max_length=255) region = models.ForeignKey(NationalRegion, on_delete=models.CASCADE, related_name='counties') def __str__(self): return self.name