Ticket #4759: there_is_no_admin_manager.patch
File there_is_no_admin_manager.patch, 715 bytes (added by , 17 years ago) |
---|
-
django/contrib/admin/filterspecs.py
158 158 def __init__(self, f, request, params, model): 159 159 super(AllValuesFilterSpec, self).__init__(f, request, params, model) 160 160 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) 162 162 163 163 def title(self): 164 164 return self.field.verbose_name