diff --git a/wishlist/models.py b/wishlist/models.py index 9d3bec3..2aabd71 100644 --- a/wishlist/models.py +++ b/wishlist/models.py @@ -12,6 +12,8 @@ class WishList(models.Model): hidden = models.BooleanField(default=True, help_text="Whether to hide on the users' list of their wishlists.") hide_granted = models.BooleanField(default=False, help_text="Whether to hide already fulfilled wishes.") + def __str__(self): return self.name + class WishedItem(models.Model): # Meta class? @@ -21,6 +23,8 @@ class WishedItem(models.Model): description = models.TextField(blank=True, help_text="Detailed description of the item, for example its specification.") wishlists = models.ManyToManyField(WishList, related_name='wishes', help_text="Wishlists that this wish should be part of.") + def __str__(self): return self.name + # FIXME: create more sensible name... class DreamComeTrue(models.Model): @@ -28,3 +32,4 @@ class DreamComeTrue(models.Model): when = models.DateTimeField(auto_now_add=True, help_text="When the dream came true") note = models.TextField(blank=True, help_text="Optional note, e.g. tracking number. Private, shown only to owner.") + def __str__(self): return f"Dream of {self.item} came true on {self.when}"