#12105: Admin querystring __isnull=False filter doesn't work
-------------------------------------------+--------------------------------
          Reporter:  marcob                |         Owner:  mikepenn     
            Status:  new                   |     Milestone:  1.2          
         Component:  django.contrib.admin  |       Version:  1.1          
        Resolution:                        |      Keywords:  isnull filter
             Stage:  Accepted              |     Has_patch:  1            
        Needs_docs:  0                     |   Needs_tests:  1            
Needs_better_patch:  1                     |  
-------------------------------------------+--------------------------------
Changes (by mikepenn):

  * owner:  nobody => mikepenn

Comment:

 Replying to [ticket:12105 marcob]:
 > 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:5>
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-upda...@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.


Reply via email to