Skip to content

Commit

Permalink
admin: Add Note admin
Browse files Browse the repository at this point in the history
  • Loading branch information
andrepapoti committed Mar 7, 2024
1 parent 686b4d7 commit 59175a7
Showing 1 changed file with 10 additions and 0 deletions.
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', '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
Expand Down

0 comments on commit 59175a7

Please sign in to comment.