Order messages in reverse time in admin
- Legacy-Id: 3859
This commit is contained in:
parent
96acfa250f
commit
da625e5db3
|
@ -6,6 +6,7 @@ class MessageAdmin(admin.ModelAdmin):
|
|||
list_display = ["subject", "by", "time", "groups"]
|
||||
search_fields = ["subject", "body"]
|
||||
raw_id_fields = ["by"]
|
||||
ordering = ["-time"]
|
||||
|
||||
def groups(self, instance):
|
||||
return ", ".join(g.acronym for g in instance.related_groups.all())
|
||||
|
@ -17,5 +18,6 @@ class SendQueueAdmin(admin.ModelAdmin):
|
|||
list_filter = ["time", "send_at", "sent_at"]
|
||||
search_fields = ["message__body"]
|
||||
raw_id_fields = ["by"]
|
||||
ordering = ["-time"]
|
||||
|
||||
admin.site.register(SendQueue, SendQueueAdmin)
|
||||
|
|
Loading…
Reference in a new issue