Django - check for null in database

By: Varghese Chacko 2 years, 4 months ago


In django, the NULL valuein the database field is tested with field lookup isnull It takes either True or False, which correspond to SQL queries of IS NULL and IS NOT NULL, respectively.



SQL equivalent:

SELECT * from enty WHERE pub_date IS NULL;

Let us talk!

We take the vision which comes from dreams and apply the magic of science and mathematics, adding the heritage of our profession and our knowledge to create a design.