On 8/20/06, Adrian Holovaty <[EMAIL PROTECTED]> 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...

Yeah, I guess it is just a formatting nitpick, thanks for confirming
that.  The main thing was I was trying to get a line break in there.
The \n doesn't do it, obviously, because those are ignored in html.  I
put a <br/> in there, but somewhere it was converted helpfully into
&lt;br/&gt;  Oh well, I'll keep playing around with it.

Thanks for the replies!

Bryan

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

Reply via email to