# Imports
from django.contrib import admin
from .filters import ResolvedByListFilter
# Exports
__all__ = (
"BaseResolvedByModelAdmin",
)
# Models
[docs]class BaseResolvedByModelAdmin(admin.ModelAdmin):
"""Base admin class for models implementing the ``ResolvedByModel``."""
[docs] def get_list_display(self, request):
a = super().get_list_display(request)
a.append("is_resolved")
a.append("resolved_dt")
a.append("resolved_by")
return a
[docs] def get_list_filter(self, request):
a = super().get_list_filter(request)
a.append("is_resolved")
a.append(ResolvedByListFilter)
return a