how to filter queryset based on Datefield in django?

Published: 13/01/2019
how to filter queryset based on Datefield in django?
Source: STACKOVERFLOW.COM

I need to filter queryset based on today/tommorows date and the field available is a date field not datetime field I am using custom manager for providing filtered result class CallbackReqManager(models.Manager): def get_queryset(self): return super().get_queryset().filter() def callbacktoday(self): today=date.today print(today) return self.filter(prefereddate=today) class CallbackReq(models.Model

Read more
Related news
Comment
FACEBOOK