Dear Denis,
in the model I would simply calculate the value and not how it is
displayed in admin interface.
I thought there was an easy way to format the function result as
already done for the fields in the model.
Thank you.
Vittorino.
On 4 Feb, 15:26, Denis Darii wrote:
Vittorino, this is not related to your initial question and you must
consider that the format() returns always a string. And why do you use
format() in total_no_vat()?
I would separate the "total":
...
def total_no_vat(self):
return self.total_income + self.total_fee
def
Hi,
I think this is not the solution.
I do another example:
MODEL
class Procedure(models.Model):
total_income = models.DecimalField (
default = 0,
max_digits = 11,
decimal_places = 4,
verbose_name = _("Total Income"),
)
Hello,
i've a problem with number format localization. This is an example of
my model and admin:
MODEL
class Procedure(models.Model):
total_income = models.DecimalField (
default = 0,
max_digits = 11,
decimal_places = 4,
verbose_name =
4 matches
Mail list logo