Advertisement
Guest User

Untitled

a guest
Nov 12th, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. class QuizQuestion(models.Model):
  2. class Meta:
  3. verbose_name = "Quiz Question"
  4. verbose_name_plural = "Quiz Questions"
  5.  
  6. def __str__(self):
  7. return str(self.question)
  8.  
  9. quiz = models.ForeignKey(Quiz, on_delete=models.CASCADE)
  10. question = models.TextField("Question")
  11. topic = models.ForeignKey("Topic", null=True, blank=True, on_delete=models.CASCADE)
  12. image = models.ImageField("Image", null=True, blank=True)
  13. points = models.IntegerField("Point Value", null=True, blank=True)
  14. created = models.DateField("Created", auto_now=True)
  15. updated = models.DateField("Created", auto_now_add=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement