python 2.7中不支持的操作数类型

时间:2016-07-01 17:09:18

标签: python-2.7

def was_published_recently(self):
    return self.pub_date >= timezone.now() - datetime.timedelta(days=1)
TypeError: unsupported operand type(s) for -: 'function' and 'datetime.timedelta

0 个答案:

没有答案