#12105: Admin querystring __isnull=False filter doesn't work -------------------------------------------+-------------------------------- Reporter: marcob | Owner: nobody Status: new | Milestone: Component: django.contrib.admin | Version: 1.1 Resolution: | Keywords: isnull filter Stage: Unreviewed | Has_patch: 1 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | -------------------------------------------+-------------------------------- Changes (by Alex):
* needs_better_patch: => 0 * needs_tests: => 0 * needs_docs: => 0 Old description: > If I use __isnull=False with an admin querystring filter I always get a > IS NULL query. > Try with: > {{{ > http://127.0.0.1:8000/admin/auth/user/?email__isnull=False > > http://127.0.0.1:8000/admin/auth/user/?email__isnull=True > }}} > You'll get same results. > I fixed with a tiny patch (attached): > {{{ > elif key.endswith('__isnull'): > value = False if value.lower() == 'false' else Tru > }}} New description: If I use {{{ __isnull=False }}} with an admin querystring filter I always get a IS NULL query. Try with: {{{ http://127.0.0.1:8000/admin/auth/user/?email__isnull=False http://127.0.0.1:8000/admin/auth/user/?email__isnull=True }}} You'll get same results. I fixed with a tiny patch (attached): {{{ elif key.endswith('__isnull'): value = False if value.lower() == 'false' else Tru }}} -- Ticket URL: <http://code.djangoproject.com/ticket/12105#comment:1> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---