Skip to content

Commit da625e5

Browse files
committed
Order messages in reverse time in admin
- Legacy-Id: 3859
1 parent 96acfa2 commit da625e5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ietf/message/admin.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ class MessageAdmin(admin.ModelAdmin):
66
list_display = ["subject", "by", "time", "groups"]
77
search_fields = ["subject", "body"]
88
raw_id_fields = ["by"]
9+
ordering = ["-time"]
910

1011
def groups(self, instance):
1112
return ", ".join(g.acronym for g in instance.related_groups.all())
@@ -17,5 +18,6 @@ class SendQueueAdmin(admin.ModelAdmin):
1718
list_filter = ["time", "send_at", "sent_at"]
1819
search_fields = ["message__body"]
1920
raw_id_fields = ["by"]
21+
ordering = ["-time"]
2022

2123
admin.site.register(SendQueue, SendQueueAdmin)

0 commit comments

Comments
 (0)