从下面的代码我打算打印日期范围很好,但问题是我需要打印日期范围,仅在数据库中可用[this image shows the created_at date field which is in look model . I need these dated to be printed if user select the date rage between dec 1 to dec 30 ] 1
while (current_date >= from_date):
r = r + 1
ws.write(0,r,current_date,style)
current_date -= timedelta(days = 1)
models.py
class Look(models.Model):
created_at = models.DateField()