wizard.py 文件源码

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

项目:postix 作者: c3cashdesk 项目源码 文件源码
def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        if self.instance:
            valid_products = ProductItem.objects.filter(item=self.instance).values_list('product_id', flat=True)
            self.initial['products'] = Product.objects.filter(pk__in=valid_products)
        self.helper = FormHelper()
        self.helper.form_class = 'form-horizontal'
        self.helper.add_input(Submit('submit', _('Save Item')))
        self.helper.label_class = 'col-lg-2'
        self.helper.field_class = 'col-lg-8'
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号