--- a/web/lib/django/contrib/admin/views/main.py Wed May 19 17:43:59 2010 +0200
+++ b/web/lib/django/contrib/admin/views/main.py Tue May 25 02:43:45 2010 +0200
@@ -9,11 +9,6 @@
from django.utils.http import urlencode
import operator
-try:
- set
-except NameError:
- from sets import Set as set # Python 2.3 fallback
-
# The system will display a "Show all" link on the change list only if the
# total result count is less than or equal to this setting.
MAX_SHOW_ALL_ALLOWED = 200
@@ -185,6 +180,13 @@
if key.endswith('__in'):
lookup_params[key] = value.split(',')
+ # if key ends with __isnull, special case '' and false
+ if key.endswith('__isnull'):
+ if value.lower() in ('', 'false'):
+ lookup_params[key] = False
+ else:
+ lookup_params[key] = True
+
# Apply lookup parameters from the query string.
try:
qs = qs.filter(**lookup_params)