On 9/6/05, jws <[EMAIL PROTECTED]> wrote:
> The third table represents a many-many table relating the first two
> tables. Assuming the foreign key constraints are correct in the models,
> the admin interface will cleverly show the human-readable description,
> rather than the meaningless primary key. In the case of the first two
> tables, clearly the best representations would be self.name and
> self.description. The third case is less clear. What I would like to do
> is-
>
> return '%s - %s' % (person.name,activity.description)
Have you tried this?
def __repr__(self):
return "%s - %s" % (self.get_person().name, self.get_activity().description)
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org