Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from django.db import models
- from django.utils.encoding import python_2_unicode_compatible
- @python_2_unicode_compatible # only if you need to support Python 2
- class Question(models.Model):
- # ...
- def __str__(self):
- return self.question_text
- @python_2_unicode_compatible # only if you need to support Python 2
- class Choice(models.Model):
- # ...
- def __str__(self):
- return self.choice_text
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement