my inline:
class CollaboratorInLine(admin.StackedInline):
model = Collaborator
extra = 0
my model:
class Collaborator(models.Model):
report = models.ForeignKey(Report)
collaborator = models.ForeignKey(User, limit_choices_to={'groups__name':u'team1'})
def reutnName(self):
return self.collaborator.get_full_name()
def __unicode__(self):
return self.collaborator.get_full_name()
The inline collaborator is shown as a drop downlist, and the ppl are shown as usernames intead of full names. does anyone know how to change it to full name?
thanks