Mercurial > public > sg101
diff polls/models.py @ 1206:02181fa5ac9d modernize tip
Update to Django 1.9.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 22 Jan 2025 17:58:16 -0600 |
parents | eeaf387803c6 |
children |
line wrap: on
line diff
--- a/polls/models.py Sat Jan 04 21:34:31 2025 -0600 +++ b/polls/models.py Wed Jan 22 17:58:16 2025 -0600 @@ -89,7 +89,7 @@ class Choice(models.Model): """Model for poll choices""" - poll = models.ForeignKey(Poll) + poll = models.ForeignKey(Poll, on_delete=models.CASCADE) choice = models.CharField(max_length=200) votes = models.IntegerField(default=0) voters = models.ManyToManyField(User, blank=True)