Skip to content

Commit

Permalink
print content
Browse files Browse the repository at this point in the history
  • Loading branch information
vyolbius committed Sep 12, 2021
1 parent 3202859 commit b939c8d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion polls/models.py
Expand Up @@ -4,9 +4,13 @@
class Question(models.Model): class Question(models.Model):
question_text = models.CharField(max_length=200) question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published') pub_date = models.DateTimeField('date published')
def __str__(self):
return self.question_text




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

0 comments on commit b939c8d

Please sign in to comment.