def get_today_stats(self): return sum(record.amount for record in self.records if record.date == dt.date.today())
def get_today_stats(self): return sum(record.amount for record in self.records if record.date == dt.date.today())
today = dt.date.today() return sum( record.amount for record in self.records if record.date == today )