From d4e578d0f64971483ded49f9cae460ea174b5138 Mon Sep 17 00:00:00 2001 From: Denis Moskalets Date: Tue, 3 Dec 2013 13:24:45 +0400 Subject: Fixed #21552 -- Allowed the use of None for the iexact lookup. Thanks Anubhav Joshi for the documentation. --- docs/ref/models/querysets.txt | 6 ++++++ docs/releases/1.7.txt | 3 +++ 2 files changed, 9 insertions(+) (limited to 'docs') diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index fa4a09756f..e15e55d05c 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -2028,9 +2028,15 @@ iexact Case-insensitive exact match. +.. versionchanged:: 1.7 + + If the value provided for comparision is ``None``, it will be interpreted + as an SQL ``NULL`` (see :lookup:`isnull` for more details). + Example:: Blog.objects.get(name__iexact='beatles blog') + Blog.objects.get(name__iexact=None) SQL equivalent:: diff --git a/docs/releases/1.7.txt b/docs/releases/1.7.txt index e4ede9913e..25b2714d42 100644 --- a/docs/releases/1.7.txt +++ b/docs/releases/1.7.txt @@ -450,6 +450,9 @@ Models argument to control whether or not to perform operations in bulk (i.e. using ``QuerySet.update()``). Defaults to ``True``. +* It is now possible to use ``None`` as a query value for the :lookup:`iexact` + lookup. + Signals ^^^^^^^ -- cgit v1.3