Ticket #12105: isnull_false_filter.patch

File isnull_false_filter.patch, 689 bytes (added by marcob, 15 years ago)
  • lib/django/contrib/admin/views/main.py

    diff -r dcf5bac0127a lib/django/contrib/admin/views/main.py
    a b  
    184184            # if key ends with __in, split parameter into separate values
    185185            if key.endswith('__in'):
    186186                lookup_params[key] = value.split(',')
     187            elif key.endswith('__isnull'):
     188                if value.lower() in ('', 'false'):
     189                    lookup_params[key] = False
     190                else:
     191                    lookup_params[key] = True
    187192
    188193        # Apply lookup parameters from the query string.
    189194        try:
Back to Top