阅读背景:

Django - 如何在查询集中使用modelForm的关联模型到表单

来源:互联网 

How do I access the model object associated in a ModelForm? Something like self.Meta.model? My model and form are defined as below, where I am trying to accessing the model's attribute by "self.Meta.model.attribute", but this doesn't work. How do I access the model object associated in




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: