views.py 文件源码

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

项目:djragondrop 作者: petroleyum 项目源码 文件源码
def form_class_from_model(self):
        if self.model_name in self.model_form_fields:
            Form = modelform_factory(self.model, fields=self.model_form_fields[self.model_name], widgets={'user': widgets.TextInput})
        else:
            Form = modelform_factory(self.model, exclude=self.excluded_fields, widgets={'user': widgets.TextInput})
        return Form
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号