from django.db.models import Q, F
Table.objects.filter(~Q(in_time=F('actual_time')), in_time__gt=datetime.
    datetime(2013, 12, 31))
Django - query for to give rows where one column Not equals to another column in same model