#100DaysofCode Days 5 & 6

Continuing with the Django tutorial… and discovered Django Girls, too, a UK-based nonprofit.

I hadn’t yet seen SQL in classes, and it’s just so… eloquent. I like it.

class Choice(models.Model):
    question = models.ForeignKey(Question, on_delete = models.CASCADE)
    choice_text = models.CharField(max_length = 200)
    votes = models.IntegerField(default = 0)
    def __str__(self):
        return self.choice_text

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.