Milton Waddams wrote: > I'm trying to associate multiple users with a team and each user having a > specific role within that team. > > eg. not my situation though easiest way to make it clear what I'm attempting > to achieve... > CEO = meta.ForeignKey(User) > CFO = meta.ForeignKey(User) > > when I go to edit this in the admin area I get User: as the name of the > field on the left, I've tried using related_name though that makes no > difference. I'm sure I'm missing something though wasn't able to see it in > the docs. Is there a way for me to specify the text which shows up on the > left of foreign keys? >
I think this is a bug, but you can work around it using CEO = meta.ForeignKey(User, verbose_name="CEO" ) CFO = meta.ForeignKey(User, verbose_name="CFO" ) I don't know why the name of the class is used in preference to the name of the field, which seems more natural. Rob