如何从Django中的表单模板访问模型 [英] How to Access model from Form template in Django
本文介绍了如何从Django中的表单模板访问模型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
{{model_form._meta.model}}
I have a form that edits a model. In the template though I would like to access the model. Is this possible and how can I accomplish this?
解决方案
{{ model_form._meta.model }}
这篇关于如何从Django中的表单模板访问模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文