def left_average_per_day(self):
days = monthrange(date.today().year, date.today().month)[1]
rest_days = days - date.today().day + 1 # we need to take into account spendings for today
return (self.left/rest_days).quantize(Decimal('.01'), rounding=ROUND_DOWN)
评论列表
文章目录