Skip to content

Commit cafc714

Browse files
andrepapotivictor-accarini
authored andcommitted
admin: Add Note admin
Signed-off-by: andrepapoti <[email protected]>
1 parent a87fd13 commit cafc714

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

patchwork/admin.py

+10
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from patchwork.models import Cover
1414
from patchwork.models import CoverComment
1515
from patchwork.models import DelegationRule
16+
from patchwork.models import Note
1617
from patchwork.models import Patch
1718
from patchwork.models import PatchComment
1819
from patchwork.models import PatchRelation
@@ -130,6 +131,15 @@ class PatchCommentAdmin(admin.ModelAdmin):
130131
admin.site.register(PatchComment, PatchCommentAdmin)
131132

132133

134+
class NoteAdmin(admin.ModelAdmin):
135+
list_display = ('patch', 'submitter', 'created_at', 'updated_at')
136+
search_fields = ('patch__name', 'submitter__name', 'submitter__email')
137+
date_hierarchy = 'created_at'
138+
139+
140+
admin.site.register(Note, NoteAdmin)
141+
142+
133143
class PatchInline(admin.StackedInline):
134144
model = Patch
135145
extra = 0

0 commit comments

Comments
 (0)