dashboard_forms.py 文件源码

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

项目:CommunityCellularManager 作者: facebookincubator 项目源码 文件源码
def __init__(self, *args, **kwargs):
        super(SubVacuumForm, self).__init__(*args, **kwargs)
        self.helper = FormHelper()
        self.helper.form_id = 'inactive-subscribers-form'
        self.helper.form_method = 'post'
        self.helper.form_action = '/dashboard/network/inactive-subscribers'
        # Render the inactive_days field differently depending on whether or
        # not this feature is active.
        if args[0]['sub_vacuum_enabled']:
            days_field = Field('inactive_days')
        else:
            days_field = Field('inactive_days', disabled=True)
        self.helper.layout = Layout(
            'sub_vacuum_enabled',
            days_field,
            Submit('submit', 'Save', css_class='pull-right'),
        )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号