在提交与此视图关联的表单时获取此错误。不知道问题到底是什么,考虑到我有一个结构非常相似的表单,它工作得很好。class Facture_Creer(SuccessMessageMixin, CreateView): template_name = "facturation/nouvelle_facture.html"
# permet de retourner a l'URL pointant vers le membre
我有一个Django ListView/FormView组合,其中页面列表中的每个对象都有一个按钮,可以切换一个模态表单。表单有一个隐藏的字段,我想预先填充它来自列表中对象的弹格(即。我可以想到的一种方法是让{{ form }标签接受对象的弹格作为参数,类似于{ form object_instance=object.slug }}。我该怎么做?
自从我做Django以来已经有一段时间了,我发现了一个从我需要的按钮调用视图的示例: How do I call a Django function on button click?Registration</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.jstournament.start_t