Did you want to do this?
class ItemGroup(meta.Model):
product_group = meta.ForeignKey(ProductGroup)
customer_order = meta.ForeignKey(CustomerOrder)
def __repr__(self):
return "%s" % self.get_productgroup().name
I *think* that should work, if have an example where I'm doing this;
...
person = meta.ForeignKey(Person, to_field='person_id', raw_id_admin
= True)
event = meta.ForeignKey(Event, to_field='event_id') # trying to tie
up an event...
...
def __repr__(self):
return "%s/%s" % (self.get_event().shortsummary(),
self.get_person().titlename())
and it works fine - note that shortsummary and titlename are functions
and so need (), attributes don't need them.
Cheers,
Tone