Monday, November 29, 2010

manytomany display field

Hi,

How do I choose which field should appears on the admin interface when I use manytomany field?

eg:

class Service(models.Model):
name = models.CharField(..)
acronym = models.CharField(..)

class Test(models.Model):
services = models.ManyToManyField()


When I add a new Test object on admin interface, the services field displays the "name" field on the multiple select box. I want to display the acronym field on this box. How can I do this?

thanks, anderson

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment