Creating a function off the model worked great! --- On Wed, 10/14/09, Bayuadji <bayua...@gmail.com> wrote:
> From: Bayuadji <bayua...@gmail.com> > Subject: Re: Admin Settings > To: django-users@googlegroups.com > Date: Wednesday, October 14, 2009, 11:52 PM > > or create a function that return > object.foreign_key.field1. > then use the function in list_display > > cheers. > -djibon- > > On 10/14/09, justquick <justqu...@gmail.com> > wrote: > > > > try using 'foreign_key__field1' instead > > > > On Oct 14, 12:04 pm, freeav8r <freea...@yahoo.com> > wrote: > >> Is it possible to do something like this: > >> > >> class MyModelAdmin(admin.ModelAdmin): > >> list_display = (‘field1’, field2’, > ‘foreign_key’, > >> ‘foreign_key.field1’, foreign_key.field2’,) > >> > >> admin.site.register(MyModel, MyModelAdmin) > >> > >> ‘foreign_key’ works just fine, but > ‘foreign_key.field1’ and > >> ‘foreign_key.field2’ error out. Any > suggestions? > > > > > > > > -- > -------------------------------------------------------------- > http://www.tumbletooth.org > my linkedin profile : http://www.linkedin.com/in/bayuadji > -------------------------------------------------------------- > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---