# HG changeset patch # User Steve Losh # Date 1309455296 14400 # Node ID fb6ff76d6105c7971350c50f47f5bf7d6f47c31e # Parent e205a5c3eeab77648b30f5fbd45002a6608c1ea3 Typo. diff -r e205a5c3eeab -r fb6ff76d6105 content/blog/2011/06/django-advice.html --- a/content/blog/2011/06/django-advice.html Thu Jun 30 10:40:29 2011 -0400 +++ b/content/blog/2011/06/django-advice.html Thu Jun 30 13:34:56 2011 -0400 @@ -780,7 +780,7 @@ list_display = ('title', 'author_name') def author_name(self, obj): - return o.name + return obj.name That will display the name just fine. However, it won't be a fully-fledged column in the Django admin because you can't sort on it. @@ -794,7 +794,7 @@ list_display = ('title', 'author_name') def author_name(self, obj): - return o.name + return obj.name author_name.admin_order_field = 'author__name' Now the author name has all the functionality of a real `list_display` entry.