There is a DateField in my model. If I want to take back all data that date from today, how will it be made? for example. Withdraw all fields with today's dates and close on December 31
today = datetime.date.today
Object.object.filter (date__day! = Today )
Or can it be exclusion?
If I understand what you are trying to do, just filter this way Should be enabled in:
today = datetime.date.today () Object.objects.filter (date__gt = today, date__year = today.year)
Comments
Post a Comment