Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

display thread subject in message admin

  • Loading branch information...
commit 143edeb30aeaaff1bbe44b26bd4fa4139609d56a 1 parent fbbca27
@hannesstruss hannesstruss authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 threaded_messages/admin.py
View
4 threaded_messages/admin.py
@@ -14,6 +14,10 @@ class MessageAdmin(admin.ModelAdmin):
search_fields = ('body', 'sender__first_name',
'sender__last_name', 'sender__username')
raw_id_fields = ('sender',)
+ readonly_fields = ('subject',)
+
+ def subject(self, msg):
+ return msg.thread.all()[0].subject
admin.site.register(Message, MessageAdmin)
Please sign in to comment.
Something went wrong with that request. Please try again.