django / django/new-features

[Admin] Dynamic columns in list view

Open
#32 4 comments 7 reactions 0 assignees View on GitHub
Admin Frontend/JavaScript Third Party Package
Dominant language
No language data
Stars
188
Forks
7
PR merge metrics
No merged PRs in 30d

Description

### Code of Conduct

- [x] 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.

```python
@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_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.