Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1# Imports
3from django.contrib import admin
4from .filters import ReviewedByListFilter
6# Exports
8__all__ = (
9 "BaseReviewedByModelAdmin",
10)
12# Models
15class BaseReviewedByModelAdmin(admin.ModelAdmin):
16 """Base admin class for models implementing the ``ReviewedByModel``."""
18 def get_list_display(self, request):
19 a = super().get_list_display(request)
21 a.append("is_reviewed")
22 a.append("reviewed_dt")
23 a.append("reviewed_by")
25 return a
27 def get_list_filter(self, request):
28 a = super().get_list_filter(request)
30 a.append("is_reviewed")
31 a.append(ReviewedByListFilter)
33 return a