I saw the next two methods in an old question here but it is not clear for me what is the difference between:
{'date_time_field__range': (datetime.datetime.combine(date, datetime.time.min),
datetime.datetime.combine(date, datetime.time.max))}
and
YourModel.objects.filter(datetime_published__year='2008',
datetime_published__month='03',
datetime_published__day='27')
Was confused about this myself, but I think I've worked it out :-D I found the documentation about the range lookup option very helpful.
When you do:
The SQL will look something like:
Whereas this part of django's generic date based views:
becomes something like:
which produces SQL along the lines of:
(the format of the timestamp in the last SQL example is wrong obviously, but you get the idea)
Hope that answers your question :)