Skip to content

Django Admin - Categorizing list_filter #205

Description

@SourceDoctor

Code of Conduct

  • I agree to follow Django's Code of Conduct

Feature Description

Idea is to be able to categorize list_filter, so filter can be grouped.

At moment it's just a list order dependend bunch of fields.

Problem

At moment it's just a list order dependend bunch of fields.

On tables with many filters a specific filter is hard to be found, or will be overseen easily.

Request or proposal

request

Additional Details

No response

Implementation Suggestions

I think a structure similar to fieldset grouping would be the best way.

For backward compatbility this should be an optional feature.

-> if a list_filter Element is a list or tuple, it's not a field, it's a categorized filter group

Implementation thought for django admin:

    def get_list_filter(self, request):
       return (
		('Category A', {
                      fields: ['filter_a', 'filter_b', 'filter_c']}
					  ),
		('Category B', {
                      fields: ['filter_d', 'filter_e', 'filter_f']}
					  )
		)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions