Skip to content
Open
Prev Previous commit
Next Next commit
admin: Add Note admin
Signed-off-by: andrepapoti <andrepapoti@gmail.com>
  • Loading branch information
andrepapoti authored and victor-accarini committed Jan 24, 2025
commit cafc714983b971c14414a364c877e4c9ccdfc4c9
10 changes: 10 additions & 0 deletions patchwork/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
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
Expand Down Expand Up @@ -130,6 +131,15 @@ class PatchCommentAdmin(admin.ModelAdmin):
admin.site.register(PatchComment, PatchCommentAdmin)


class NoteAdmin(admin.ModelAdmin):
list_display = ('patch', 'submitter', 'created_at', 'updated_at')
search_fields = ('patch__name', 'submitter__name', 'submitter__email')
date_hierarchy = 'created_at'


admin.site.register(Note, NoteAdmin)


class PatchInline(admin.StackedInline):
model = Patch
extra = 0
Expand Down