Skip to main content

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

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

django_admin_select_columns-1.0.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_admin_select_columns-1.0.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file django_admin_select_columns-1.0.0.tar.gz.

File metadata

File hashes

Hashes for django_admin_select_columns-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5f985cf488405f0f2cd7a3157ab92eae3169ec3dae72e807db3cca150f28e904
MD5 42e736bbacc00ebcc5da08a4e8f7c251
BLAKE2b-256 3db9c992831dd75f3f44c3cee5c5dfcbc332a6d3d75d5fdb3dda380e14bbc4e4

See more details on using hashes here.

File details

Details for the file django_admin_select_columns-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_admin_select_columns-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8ae8472d3fee065392db69d7745b82625bbf83502d45177fa7ae064ac5c5612c
MD5 5d2c74b3a71cec24eb0af933c10b1439
BLAKE2b-256 65ea879ca8b4f13287fa03c37e438700be65811a996591623338df1812595c15

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page