我正尝试在Django视图中创建一个表单对象,并在其上运行is_valid()方法。在案例2和案例3中,user字段"Select a valid choice. That choice is not one of the available choices."出现了错误,我认为这是因为user是一个外键字段,并且在表单中呈现为一个下拉选择字段
我正在尝试自定义Django的评论表单。在django.contrib.comments.forms内部,我注意到所有字段表单都在类CommentDetailForm中声明,该类是从CommentSecurityForm继承的。然后,当我编写模板标记{% get_comment_form for order as form %}时,它得到了一个名为CommentForm的类,它继承了带有蜜罐字段的CommentDetailForm我希