Re: Add foreign key name to admin's list_display?

2008-10-17 Thread Ty
Great! Changing the list_display to 'post' and changing the return value of Post's __unicode__ worked perfectly. Thanks for your help! On Oct 17, 4:16 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Fri, Oct 17, 2008 at 3:21 PM, Ty <[EMAIL PROTECTED]> wrote: > > > # admin.py: > > from

Re: Add foreign key name to admin's list_display?

2008-10-17 Thread Karen Tracey
On Fri, Oct 17, 2008 at 3:21 PM, Ty <[EMAIL PROTECTED]> wrote: > > # admin.py: > from django.contrib import admin > from clydefrog.blog.models import Post, Comment > > class PostAdmin(admin.ModelAdmin): >list_display = ('name', 'slug', 'date', 'is_published',) >list_filter =

Add foreign key name to admin's list_display?

2008-10-17 Thread Ty
# admin.py: from django.contrib import admin from clydefrog.blog.models import Post, Comment class PostAdmin(admin.ModelAdmin): list_display = ('name', 'slug', 'date', 'is_published',) list_filter = ('is_published',) ordering = ('is_published', '-date', 'name',)