feat: added lots of tests
This commit is contained in:
@@ -34,6 +34,10 @@ class Product(models.Model):
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
@property
|
||||
def price(self):
|
||||
return self.prices.last()
|
||||
|
||||
class Meta:
|
||||
verbose_name = _("Producto")
|
||||
verbose_name_plural = _("Productos")
|
||||
|
||||
Reference in New Issue
Block a user