﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
28185	ModelAdmin.lookup_allowed() fails to consider dynamic list_filter	IT Management	nobody	"If I define dynamic filters using ""get_list_filter"" method in my Admin class and try to use any of them, a DisallowedModelAdminLookup exception is raised.

I thing there is an error in file ""django.contrib.admin.options.py"" in class ""BaseModelAdmin"" and method ""lookup_allowed"".

{{{
class BaseModelAdmin(six.with_metaclass(forms.MediaDefiningClass)):
  def lookup_allowed(self, lookup, value):
--cut--
    for filter_item in self.list_filter:
--cut--
}}}

I thing the right form is:

{{{
class BaseModelAdmin(six.with_metaclass(forms.MediaDefiningClass)):
  def lookup_allowed(self, lookup, value):
--cut--
    for filter_item in self.get_list_filter():
--cut--
}}}
"	Bug	closed	contrib.admin	1.11	Normal	duplicate			Unreviewed	0	1	0	0	0	0
