Ticket #4759: there_is_no_admin_manager.patch

File there_is_no_admin_manager.patch, 715 bytes (added by yi.codeplayer at gmail dot com, 17 years ago)

the patch itself.

  • django/contrib/admin/filterspecs.py

     
    158158    def __init__(self, f, request, params, model):
    159159        super(AllValuesFilterSpec, self).__init__(f, request, params, model)
    160160        self.lookup_val = request.GET.get(f.name, None)
    161         self.lookup_choices = model._meta.admin.manager.distinct().order_by(f.name).values(f.name)
     161        self.lookup_choices = model._meta.admin(model).queryset(request).distinct().order_by(f.name).values(f.name)
    162162
    163163    def title(self):
    164164        return self.field.verbose_name
Back to Top