Created
October 22, 2016 12:18
-
-
Save codeboy101/9268542f3166351037a99def4a875f76 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from django.db import models | |
| class Story(models.Model): | |
| title = models.CharField(max_length=75) | |
| body = models.TextField() | |
| rating = models.IntegerField(default=0) | |
| def __str__(self): | |
| return self.title | |
| class UserActs(models.Model): | |
| voters = models.ManyToManyField(Story) | |
| def __str__(self): | |
| return self.voters |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment