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