multiform.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:iguana 作者: iguana-project 项目源码 文件源码
def _process_individual_form(self, form_name, form_classes):
        """
        Perform the is_valid() check for a single form.
        """
        forms = self.get_forms(form_classes, (form_name,))
        form = forms.get(form_name)
        if not form:
            # there is no form with this name registered in the form_classes dictionary
            return HttpResponseForbidden()
        elif form.is_valid():
            # the form is valid -> call the from valid method
            return self.forms_valid(forms, form_name)
        else:
            # call the form invalid method
            return self.forms_invalid(forms, form_name)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号