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 26254 Support for disallowing filter on local fields in ModelAdmin Dheerendra Rathor nobody "Currently, if a local field is not present in `list_filter` and filter is called on that particular field directly in URL, it is allowed to filter on that particular field. But, if filter is called on a relational field which is not present in `list_filter`, filter is disallowed on that particular field. This feature request is in support for disallowing filter on certain fields. This can be done by either not allowing filter on a field if field is not mentioned in `list_filter` or by adding an extra ModelAdmin field `disallowed_lookups`. But disallowing on the basis of list_filter might break admin for sites heavily relying on admin, second option will be better in my opinion. {{{ # An example fix if len(relation_parts) <= 1: # Either a local field filter, or no fields at all. if len(relation_parts) == 1 and relation_parts[0] in self.disallowed_lookups: return False return True }}}" New feature closed contrib.admin dev Normal wontfix Unreviewed 0 0 0 0 0 0