Mark fields in TeX templates as safe
This commit is contained in:
parent
21ba46c1bc
commit
eca4767155
2 changed files with 4 additions and 3 deletions
|
|
@ -137,7 +137,7 @@ class Product(models.Model):
|
|||
|
||||
@property
|
||||
def amount_euros(self):
|
||||
return self.amount / 100
|
||||
return "{:.2f}".format(self.amount / 100)
|
||||
|
||||
@property
|
||||
def total(self):
|
||||
|
|
@ -145,7 +145,7 @@ class Product(models.Model):
|
|||
|
||||
@property
|
||||
def total_euros(self):
|
||||
return self.total / 100
|
||||
return "{:.2f}".format(self.total / 100)
|
||||
|
||||
class Meta:
|
||||
verbose_name = _("product")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue