﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
2737	DB API and Model Interface don't agree on meaning of None	wardi-django@…	Adrian Holovaty	"When the value of a field in a model is None it corresponds to a NULL item in the database.

However, when using filter() or exclude() you can't pass {{{my_field=None}}} eg:
{{{
SomeModel.objects.filter(my_field=None)
}}}
does nothing, while
{{{
SomeModel.objects.exclude(my_field=None)
}}}
generates invalid SQL.

I know the preferred way to test for NULL is with {{{__isnull}}}, but the code above is what I tried first.  
I would like it if {{{my_field=None}}} is treated as equivalent to {{{my_field__isnull=True}}} (a naive patch is attached)
but if not, then at least there should be a useful error raised when you try something like {{{my_field=None}}}.

"	enhancement	closed	Database layer (models, ORM)	dev	normal	fixed	exclude filter qs-rf-fixed	mir@… django@…	Accepted	1	1	1	0	0	0
