✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
For section C of this exam, consider the following Django models that are part of a web app to collate and display UK election results for the site www.ukelectionresults.com:
class Election(models.Model): date = models.DateField()class Constituency(models.Model): name = models.CharField(max_length=128) eligible_voter_population = models.IntegerField(default=0)
class ElectionCandidate(models.Model): name = models.CharField(max_length=128) votes = models.IntegerField(default=0) constituency = models.ForeignKey(Constituency, on_delete=models.CASCADE) election = models.ForeignKey(Election, on_delete=models.CASCADE)
What recommendation could you make that would be good development practice for the Constituency model?