Retrieve the same values whose data is there or exists and not the rest.In django
问题 I want to have a data that does not have any empty value in database or in row. I wrote like this in my code. faq = FAQ.objects.values('question','answer','field_id') this the output in my terminal {'question': None, 'answer': None, 'field_id': None} {'question': 'Test question', 'answer': '<p>Testsaddsf description</p>\r\n', 'field_id': 'TestTest'} i don't want None value data. 回答1: You can filter with the __isnull lookup [Django-doc]: faq = FAQ.objects.filter( question __isnull=False ,