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
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()])
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= mo
3 matches
Mail list logo