Source code for testbot_webui.polls.models

from django.db import models


[docs]class Question(models.Model):
[docs] question_text = models.CharField(max_length=200)
[docs] pub_date = models.DateTimeField("date published")
[docs]class Choice(models.Model):
[docs] question = models.ForeignKey(Question, on_delete=models.CASCADE)
[docs] choice_text = models.CharField(max_length=200)
[docs] votes = models.IntegerField(default=0)