Skip to content

Commit

Permalink
Add some __str__ methods to make the admin pages cleaner
Browse files Browse the repository at this point in the history
  • Loading branch information
baronvonvaderham committed May 4, 2020
1 parent 614a752 commit dcf531a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions card_catalog/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ class ScryfallCard(models.Model):

objects = ScryfallCardManager()

def __str__(self):
return self.name


class CardPriceManager(models.Manager):

Expand Down Expand Up @@ -230,3 +233,6 @@ class CardPrice(models.Model):
foil_market = models.DecimalField(blank=True, null=True, max_digits=20, decimal_places=2)

objects = CardPriceManager()

def __str__(self):
return f'{self.card} Prices for {self.date}'

0 comments on commit dcf531a

Please sign in to comment.