fb6ff76d6105

Typo.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Thu, 30 Jun 2011 13:34:56 -0400
parents e205a5c3eeab
children 1e2c49f56c59
branches/tags (none)
files content/blog/2011/06/django-advice.html

Changes

--- 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.