The following line in my view selects all records that have a delay of 0
t = Times.objects.filter(delay = 0)
How do i write it such that it selects everything but with delay 0?
Use the exclude() method instead of the filter() method
https://docs.djangoproject.com/en/1.3/topics/db/queries/#retrieving-specific-objects-with-filters