Adrian Holovaty wrote: > On 8/20/06, Bryan Murdock <[EMAIL PROTECTED]> wrote: >> I'd like the admin display of Committees to display the committee >> members. I tried adding 'members.all()' to the Admin list_display, >> but that didn't work. I can sort of do it if I add this function to >> the Committee class: >> >> def all_members_str( self ): >> all_members = "" >> for member in self.members.all(): >> all_members += str( member ) + "; \n" >> return all_members >> all_members_str.short_description = "Members" >> >> and then add 'all_members_str' to the list_display, but it doesn't >> come out looking that great. Any ideas? > > That's precisely the approach I'd recommend. If it doesn't come out > looking that great, can't you just change the formatting, by, for > example using a different character rather than a semi-colon? I guess > I don't see the problem... >
the only "problem" might be that you (original poster) are doing a db-query for every Comittee object. gabor --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---