我正在使用emencia.django.newsletter
. 当我运行“python manage.py send_newsletter”时出现此错误
if self.newsletter.sending_date <= datetime.now() and \
TypeError: can't compare offset-naive and offset-aware datetimes
这就是错误的来源:
def can_send(self):
"""Check if the newsletter can be sent"""
if self.test:
return True
if self.newsletter.sending_date <= datetime.now() and\
(self.newsletter.status == Newsletter.WAITING or\
self.newsletter.status == Newsletter.SENDING):
return True
return False
我使用 Django 1.4
有任何想法吗?