Dynamically select columns in django admin changelist view with persistence
Project description
django-admin-select-columns
Dynamically select columns in django admin changelist view with persistence
Demo
Installation
You can install the package via pip:
pip install django-admin-select-columns
Add django_admin_select_columns to INSTALLED_APPS.
INSTALLED_APPS = [
...
"django_admin_select_columns",
"django.contrib.admin",
...
]
Usage
Simply add SelectColumnsMixin to your ModelAdmin.
from django.contrib import admin
from django_admin_select_columns.mixins import SelectColumnsMixin
from my_app.models import Person
@admin.register(Person)
class PersonAdmin(SelectColumnsMixin, admin.ModelAdmin):
list_display = (
"first_name",
"last_name",
"email",
"phone_number",
"gender",
"birthdate",
"is_active",
)
list_filter = ("gender", "is_active")
search_fields = ("first_name", "last_name", "email", "phone_number")
License
This project is licensed under the terms of the MIT license.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_admin_select_columns-1.0.1.tar.gz.
File metadata
- Download URL: django_admin_select_columns-1.0.1.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c58073f11a9039b5eabced09c73dac92dc257773fc7fdb4b0fb15ed0f05df2bb
|
|
| MD5 |
df5692ab3a8bd1fd8e8bd874077e0956
|
|
| BLAKE2b-256 |
f83c5b20685b86ba1487deffefb584212d3a82a3379b49f3567a501fea3ea114
|
File details
Details for the file django_admin_select_columns-1.0.1-py3-none-any.whl.
File metadata
- Download URL: django_admin_select_columns-1.0.1-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2dd5118e242226d943ab2bc149395af0522d85c8474464fc23829469bb3553c
|
|
| MD5 |
c24040e2edfb5d0d304efa89eece4416
|
|
| BLAKE2b-256 |
f9abbc4b5b239f06bc68be493ca000389c83ccd8b8175d15c1678fee3cb63faf
|