Created
August 16, 2017 14:42
-
-
Save dan-gamble/3d11606f86a953f3416c7c500a52ac6a 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
class CardCollection(models.Model): | |
user = models.OneToOneField('users.User', on_delete=models.CASCADE) | |
def __str__(self): | |
return f"{self.user}'s card collection" | |
class CardPlayer(models.Model): | |
collection = models.ForeignKey('users.CardCollection') | |
player = models.ForeignKey('players.Player') | |
def __str__(self): | |
return self.player |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment