Re: admin foreign key issues

2012-11-30 Thread Chris Cogdon
> class CategoryAdmin(admin.ModelAdmin): > list_display = ('name') > list_filter = ('name') > admin.site.register(Category, CategoryAdmin) > > But that fails with 'CategoryAdmin.list_display' must be a list or tuple. > use: list_display = ('name',) Note the trailing comma, there

Re: admin foreign key issues

2012-11-29 Thread Larry Martell
On Thu, Nov 29, 2012 at 12:34 PM, Bill Freeman wrote: > > > On Thu, Nov 29, 2012 at 12:30 PM, Larry Martell > wrote: >> >> On Thu, Nov 29, 2012 at 10:43 AM, Bill Freeman wrote: >> > >> > >> > On Thu, Nov 29, 2012 at 9:10 AM, Larry Martell >> > wrote: >> >> >> >> This is probably very simple, bu

Re: admin foreign key issues

2012-11-29 Thread Bill Freeman
On Thu, Nov 29, 2012 at 12:30 PM, Larry Martell wrote: > On Thu, Nov 29, 2012 at 10:43 AM, Bill Freeman wrote: > > > > > > On Thu, Nov 29, 2012 at 9:10 AM, Larry Martell > > wrote: > >> > >> This is probably very simple, but I've never run into this before and > >> googling has not revealed anyt

Re: admin foreign key issues

2012-11-29 Thread Larry Martell
On Thu, Nov 29, 2012 at 10:43 AM, Bill Freeman wrote: > > > On Thu, Nov 29, 2012 at 9:10 AM, Larry Martell > wrote: >> >> This is probably very simple, but I've never run into this before and >> googling has not revealed anything. >> >> I have these 2 models: >> >> class Category(models.Model): >

Re: admin foreign key issues

2012-11-29 Thread Bill Freeman
On Thu, Nov 29, 2012 at 9:10 AM, Larry Martell wrote: > This is probably very simple, but I've never run into this before and > googling has not revealed anything. > > I have these 2 models: > > class Category(models.Model): > class Meta: db_table = 'data_category' > name = models.CharFiel

admin foreign key issues

2012-11-29 Thread Larry Martell
This is probably very simple, but I've never run into this before and googling has not revealed anything. I have these 2 models: class Category(models.Model): class Meta: db_table = 'data_category' name = models.CharField(max_length=20, unique=True, db_index=True) class Tool(models.Model