获取昨日日期
oneday = datetime.timedelta(days=1) 一天
day = datetime.datetime.strptime(self.date,'%Y-%m-%d')
day2 = day - oneday
或者
today = datetime.date.today()
yesterday = str(today - datetime.timedelta(days=1))
获取昨日日期
oneday = datetime.timedelta(days=1) 一天
day = datetime.datetime.strptime(self.date,'%Y-%m-%d')
day2 = day - oneday
或者
today = datetime.date.today()
yesterday = str(today - datetime.timedelta(days=1))