>> def __str__(self): >> return "%s (%s)" % ( >> self.title, >> '/'.join(self.artists) >> ) >> >> This assumes that an Artist has a __str__ method as well. If >> not, you could change that one line to >> >> '/'.join([artist.name for artist in self.artists]) > > I did try that, with the artist having a __str__ method. It > complained that it couldn't perform the join operation on a > ManyToManyManager.
Oh... [smacks forehead] instead of "self.artists" try "self.artists.all()" (to return the results rather than the manager of those results) -tim --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---