Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KTruong008/263d8fe6c39e634ba3c5204d3fef19e3 to your computer and use it in GitHub Desktop.
Save KTruong008/263d8fe6c39e634ba3c5204d3fef19e3 to your computer and use it in GitHub Desktop.
class Hand(models.Model):
created = models.DateTimeField(auto_now_add=True)
name = models.CharField(max_length=100, blank=False, null=False)
user = models.ForeignKey(‘users.User’, related_name=’hands’, on_delete=models.CASCADE, null=False)
deck = models.ForeignKey(‘goals.Deck’, related_name=’hands’, on_delete=models.CASCADE, null=True)
class Meta:
ordering = (‘created’,)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment