在附加结果期间(附加外键)导致键错误
模型.py
class table1
id = models.IntegerField( primary key=TRUE)
ref = models.ForeignKey('table2')
class table2
name = models.CharField()
id = models.IntegerField(primaryKey= True)
address = models.CharField()
视图.py
def relation(request)
"""
some stuff
"""
query = "query set makes object of table 1"
result['content'].append([query['ref__address'])
错误是
Keyerror at /url
ref__address