Skip to main content

Django ModelAdmin replacement

Project description

Installation

$ pip install django-modeladmin

Pros

  • auto list_display (all fields)
  • auto list_filter (BooleanField fields)
  • auto search_fields (CharField and TextField fields)
  • list_display formatters - elapsed, strftime, timesince

Examples

admin.py

from django_modeladmin import admin

from .models import MyModelAdmin

@admin.register(Author)
class MyModelAdmin(admin.ModelAdmin):
    ...

list_display formatters:

list_display = [
    'id',
    'started_at',
    ('strftime','started_at','%H-%M-%S','started',),
    ('elapsed','started_at','finished_at','elapsed',),
    ('timesince','created_at','',),
]

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-modeladmin-2021.7.2.tar.gz (2.4 kB view hashes)

Uploaded Source

Supported by

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