我有 2 个模型:
class Professors(models.Model):
professors_name = models.CharField('professor', max_length=32, unique=True)
class Discipline(models.Model):
auditorium = models.IntegerField('auditorium')
professors_name = models.ForeignKey(Professors)
在视图中:
disciplines = Discipline.objects.all()
所以,我有许多礼堂和professionals_name_id。但我需要完整的教授姓名,而不是身份证。怎么做?