Skip to content

Commit fcf9bfb

Browse files
committed
Admin tweaks to make it easier to look at document comments.
- Legacy-Id: 3637
1 parent 9a6d05b commit fcf9bfb

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

ietf/idtracker/admin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ class ChairsHistoryAdmin(admin.ModelAdmin):
3232

3333
class DocumentCommentAdmin(admin.ModelAdmin):
3434
ordering=['-date']
35-
list_display=('pk', 'doc_id', 'date', 'time', 'comment_text')
35+
list_display=('doc_name', 'doc_id', 'date', 'time', 'comment_text')
36+
search_fields = ['document__draft__filename', ]
3637
admin.site.register(DocumentComment, DocumentCommentAdmin)
3738

3839
class EmailAddressAdmin(admin.ModelAdmin):

ietf/idtracker/models.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,8 @@ def datetime(self):
710710
return datetime.datetime.combine( self.date, datetime.time( * [int(s) for s in self.time.split(":")] ) )
711711
def doc_id(self):
712712
return self.document_id
713+
def doc_name(self):
714+
return self.document.draft.filename
713715
class Meta:
714716
db_table = 'document_comments'
715717

0 commit comments

Comments
 (0)