Ticket #23123: 23123.diff

File 23123.diff, 854 bytes (added by Tim Graham, 10 years ago)
  • docs/ref/contrib/admin/index.txt

    diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
    index 3ef058a..1b137f6 100644
    a b templates used by the :class:`ModelAdmin` views:  
    13001300                queryset, use_distinct = super(PersonAdmin, self).get_search_results(request, queryset, search_term)
    13011301                try:
    13021302                    search_term_as_int = int(search_term)
    1303                     queryset |= self.model.objects.filter(age=search_term_as_int)
    1304                 except:
     1303                except ValueError:
    13051304                    pass
     1305                else:
     1306                    queryset |= self.model.objects.filter(age=search_term_as_int)
    13061307                return queryset, use_distinct
    13071308
    13081309.. method:: ModelAdmin.save_related(request, form, formsets, change)
Back to Top