Source code for superdjango.db.reviewed.admin

# Imports

from django.contrib import admin
from .filters import ReviewedByListFilter

# Exports

__all__ = (
    "BaseReviewedByModelAdmin",
)

# Models


[docs]class BaseReviewedByModelAdmin(admin.ModelAdmin): """Base admin class for models implementing the ``ReviewedByModel``."""
[docs] def get_list_display(self, request): a = super().get_list_display(request) a.append("is_reviewed") a.append("reviewed_dt") a.append("reviewed_by") return a
[docs] def get_list_filter(self, request): a = super().get_list_filter(request) a.append("is_reviewed") a.append(ReviewedByListFilter) return a