[PATCH 7/9] admin: Add Note admin
andrepapoti
andrepapoti at gmail.com
Wed Mar 13 17:56:39 AEDT 2024
Signed-off-by: andrepapoti <andrepapoti at gmail.com>
---
patchwork/admin.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/patchwork/admin.py b/patchwork/admin.py
index d3bf8d2..6ac9183 100644
--- a/patchwork/admin.py
+++ b/patchwork/admin.py
@@ -13,6 +13,7 @@ from patchwork.models import Check
from patchwork.models import Cover
from patchwork.models import CoverComment
from patchwork.models import DelegationRule
+from patchwork.models import Note
from patchwork.models import Patch
from patchwork.models import PatchComment
from patchwork.models import PatchRelation
@@ -130,6 +131,15 @@ class PatchCommentAdmin(admin.ModelAdmin):
admin.site.register(PatchComment, PatchCommentAdmin)
+class NoteAdmin(admin.ModelAdmin):
+ list_display = ('patch', 'submitter', 'last_modified')
+ search_fields = ('patch__name', 'submitter__name', 'submitter__email')
+ date_hierarchy = 'last_modified'
+
+
+admin.site.register(Note, NoteAdmin)
+
+
class PatchInline(admin.StackedInline):
model = Patch
extra = 0
--
2.44.0
More information about the Patchwork
mailing list