I have a model that has datetime
filed called "start_time".
Lets say I do basic select query:
results = MyModel.objects.filter(start_time=somedate).order_by('start_time')
I will get something like:
2015-07-10 17:15:00
2015-07-10 19:15:00
2015-07-10 19:45:00
2015-07-10 21:15:00
2015-07-10 21:45:00
My goal is to exclude
all rows that are not at least 60 minutes larger then the previous row so I would get this result:
2015-07-10 17:15:00
2015-07-10 19:15:00
2015-07-10 21:15:00
Any suggestions?