Skip to content

[Admin] Dynamic columns in list view #32

Open
@VaZark

Description

@VaZark

Code of Conduct

  • I agree to follow Django's Code of Conduct

Feature Description

The list view should be configurable to have different columns based on a predefined list (all by default).

Users should be able to save this configuration and reuse it later.

@admin.register(CustomUser)
class UserAdmin(UserAdmin):
    model = CustomUser
    list_display = [
        "email",
        "name",
        "is_staff",
        "is_active",
       "last_login",
       "date_joined"
 ]
    default_list_display = [
        "email",
        "is_staff",
        "is_active",
    ]
    list_filter = [
        "is_staff",
        "is_active",
    ]

Problem

There are multiple reasons to look up a table at any given moment. Being able to choose the fields flexibly can ensure we load precisely the values we need on a need-only basis and help us avoid creating a separate proxy table just to have a different another list view in the admin. (Proxy are great if the used extensively with perms or a different detail view tho)

Request or proposal

request

Additional Details

No response

Implementation Suggestions

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Idea

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions