Re: list_display (ManyToManyField)

2006-06-23 Thread Patrick J. Anderson
Thanks, that works well. --~--~-~--~~~---~--~~ 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

Re: list_display (ManyToManyField)

2006-06-23 Thread rajesh . dhawan
I believe that this is not possible directly with m2m fields. You could define a custom function in your model that returns a list of tags. Then, list that function in Admin.list_display. Something like this: def show_tags(self): tags = ", ".join([t.__str__() for t in self.tags.all()])

list_display (ManyToManyField)

2006-06-23 Thread Patrick J. Anderson
I'd like to display a list of tags (ManyToMany relationship to Articles) in admin list_display. I'm getting a reference to an object. Is there a way to do this in Admin class inside my model? Below is a code chunk from my model: class Article(models.Model): #... tags=