Skip to content

Commit

Permalink
admin: Add Note admin
Browse files Browse the repository at this point in the history
Signed-off-by: andrepapoti <[email protected]>
  • Loading branch information
andrepapoti committed Jul 22, 2024
1 parent 262e645 commit dc75d68
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', '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

0 comments on commit dc75d68

Please sign in to comment.