我有这些型号:
class Person(models.Model):
name=models.CharField(max_length=100)
family=models.CharField(max_length=100)
class MailContact(models.Model):
person=models.ForeignKey(Person)
email=models.CharField(max_length=100)
#some fields
class Participant(models.Model):
person=models.ForeignKey(Person)
#some fields
在views.py
中:
我已经以多种方式更改了此代码,但我反复遇到以下错误:
global name 'participant__person__mailContact_set' is not defined
有什么建议吗?在
相关问题 更多 >
编程相关推荐