how to specify values in objects in django: is [] not equal to None?
问题 how can i specify or determine the values in my objects in python if it has this value [] or it has [<Booking: arab>] , let us say that in my queryset, i filter a value that not exist in my objects. here is what i have done : this date_select has no data >>> x = Booking.objects.filter(date_select='2011-12-3') >>> print x [] >>> if x == None: ... print 'none' ... >>> is it [] not equal to None? when i try a date_select that has data >>> x = Booking.objects.filter(date_select='2011-12-2') >>>