Python crispy_forms.layout 模块,Fieldset() 实例源码

我们从Python开源项目中,提取了以下25个代码示例,用于说明如何使用crispy_forms.layout.Fieldset()

项目:Django-Web-Development-with-Python    作者:PacktPublishing    | 项目源码 | 文件源码
def __init__(self, *args, **kwargs):
        super(BulletinFilterForm, self).__init__(*args, **kwargs)

        self.helper = FormHelper()
        self.helper.form_action = ""
        self.helper.form_method = "GET"

        self.helper.layout = layout.Layout(
            layout.Fieldset(
                _("Filter bulletins"),
                layout.Field("bulletin_type"),
                layout.Field("category"),
            ),
            bootstrap.FormActions(
                layout.Submit("submit", _("Filter")),
            ),
        )
项目:Django-Web-Development-with-Python    作者:PacktPublishing    | 项目源码 | 文件源码
def __init__(self, *args, **kwargs):
        super(BulletinFilterForm, self).__init__(*args, **kwargs)

        self.helper = FormHelper()
        self.helper.form_action = ""
        self.helper.form_method = "GET"

        self.helper.layout = layout.Layout(
            layout.Fieldset(
                _("Filter bulletins"),
                layout.Field("bulletin_type"),
                layout.Field("category"),
            ),
            bootstrap.FormActions(
                layout.Submit("submit", _("Filter")),
            ),
        )
项目:studentsdb    作者:PyDev777    | 项目源码 | 文件源码
def __init__(self, *args, **kwargs):
        super(CustAuthForm, self).__init__(*args, **kwargs)

        self.helper = FormHelper(self)
        self.helper.form_action = reverse('users:auth_login')
        self.helper.form_class = 'form-horizontal'
        self.helper.label_class = 'col-sm-3'
        self.helper.field_class = 'col-sm-9'
        self.helper.error_text_inline = False
        self.helper.layout = Layout(
            Hidden('next', value=reverse('home')),
            Fieldset('', 'username', 'password',
                     HTML(u'<strong><a href="%s" class="btn btn-link col-sm-offset-3 modal-link">%s</a></strong>' % (reverse('password_reset'), _(u'Forgot your password?'))),
                     'captcha'),
            ButtonHolder(Submit('submit_button', _(u'Log in')),
                         Button('cancel_button', _(u'Cancel'), css_class='btn-default')))
项目:studentsdb    作者:PyDev777    | 项目源码 | 文件源码
def __init__(self, *args, **kwargs):
        super(CustPswResetForm, self).__init__(*args, **kwargs)

        self.helper = FormHelper(self)
        self.helper.form_action = reverse('password_reset')
        self.helper.form_class = 'form-horizontal'
        self.helper.label_class = 'col-md-3'
        self.helper.field_class = 'col-md-9'
        self.helper.error_text_inline = False
        self.helper.add_input(Submit('submit_button', _(u'Confirm')))
        self.helper.add_input(Button('cancel_button', _(u'Cancel'), css_class='btn-default'))

        # self.helper.layout = Layout(
        #     # Hidden('next', value=reverse('home')),
        #     HTML(u"<p>%s</p>" % _(u"Forgot your password? Enter your email in the form below and we'll send you instructions for creating a new one.")),
        #     Fieldset('', 'email', 'captcha'),
        #     ButtonHolder(Submit('submit_button', _(u'Confirm')),
        #                  Button('cancel_button', _(u'Cancel'), css_class='btn-default')))
项目:blog_django    作者:chnpmy    | 项目源码 | 文件源码
def __init__(self, legend, *fields, **kwargs):
        self.description = kwargs.pop('description', None)
        self.collapsed = kwargs.pop('collapsed', None)
        super(Fieldset, self).__init__(legend, *fields, **kwargs)
项目:dream_blog    作者:fanlion    | 项目源码 | 文件源码
def __init__(self, legend, *fields, **kwargs):
        self.description = kwargs.pop('description', None)
        self.collapsed = kwargs.pop('collapsed', None)
        super(Fieldset, self).__init__(legend, *fields, **kwargs)
项目:MxOnline    作者:myTeemo    | 项目源码 | 文件源码
def __init__(self, legend, *fields, **kwargs):
        self.description = kwargs.pop('description', None)
        self.collapsed = kwargs.pop('collapsed', None)
        super(Fieldset, self).__init__(legend, *fields, **kwargs)
项目:djangoblog    作者:liuhuipy    | 项目源码 | 文件源码
def __init__(self, legend, *fields, **kwargs):
        self.description = kwargs.pop('description', None)
        self.collapsed = kwargs.pop('collapsed', None)
        super(Fieldset, self).__init__(legend, *fields, **kwargs)
项目:sdining    作者:Lurance    | 项目源码 | 文件源码
def __init__(self, legend, *fields, **kwargs):
        self.description = kwargs.pop('description', None)
        self.collapsed = kwargs.pop('collapsed', None)
        super(Fieldset, self).__init__(legend, *fields, **kwargs)
项目:Django-Web-Development-with-Python    作者:PacktPublishing    | 项目源码 | 文件源码
def __init__(self, *args, **kwargs):
        super(InspirationQuoteForm, self).__init__(*args, **kwargs)

        self.helper = FormHelper()
        self.helper.form_action = ""
        self.helper.form_method = "POST"

        self.helper.layout = layout.Layout(
            layout.Fieldset(
                _("Quote"),
                layout.Field("author"),
                layout.Field("quote", rows=3),
                layout.HTML("""
                {% include "quotes/includes/image_upload_widget.html" %}
                """),
                layout.Field("picture_path"),  # hidden
                layout.Field("delete_picture"),  # hidden
            ),
            bootstrap.FormActions(
                layout.Submit("submit", _("Save"), css_class="btn btn-primary"),
            )
        )
项目:xadmin-markdown-editor    作者:bluenknight    | 项目源码 | 文件源码
def __init__(self, legend, *fields, **kwargs):
        self.description = kwargs.pop('description', None)
        self.collapsed = kwargs.pop('collapsed', None)
        super(Fieldset, self).__init__(legend, *fields, **kwargs)
项目:YouPBX    作者:JoneXiong    | 项目源码 | 文件源码
def __init__(self, legend, *fields, **kwargs):
        self.description = kwargs.pop('description', None)
        self.collapsed = kwargs.pop('collapsed', None)
        super(Fieldset, self).__init__(legend, *fields, **kwargs)
项目:studentsdb    作者:PyDev777    | 项目源码 | 文件源码
def __init__(self, *args, **kwargs):
        super(CustSetPswForm, self).__init__(*args, **kwargs)

        self.helper = FormHelper(self)
        self.helper.form_class = 'form-horizontal'
        self.helper.label_class = 'col-md-3'
        self.helper.field_class = 'col-md-9'
        self.helper.error_text_inline = False
        self.helper.layout = Layout(
            HTML(u"<p>%s</p>" % _(u"Enter your new password below to reset your password:")),
            Fieldset('', 'new_password1', 'new_password2'),
            ButtonHolder(Submit('submit_button', _(u'Confirm')),
                         Button('cancel_button', _(u'Cancel'), css_class='btn-default')))
项目:eduDjango    作者:yuzhou6    | 项目源码 | 文件源码
def __init__(self, legend, *fields, **kwargs):
        self.description = kwargs.pop('description', None)
        self.collapsed = kwargs.pop('collapsed', None)
        super(Fieldset, self).__init__(legend, *fields, **kwargs)
项目:Django-IMOOC-Shop    作者:LBruse    | 项目源码 | 文件源码
def __init__(self, legend, *fields, **kwargs):
        self.description = kwargs.pop('description', None)
        self.collapsed = kwargs.pop('collapsed', None)
        super(Fieldset, self).__init__(legend, *fields, **kwargs)
项目:StudyOnline    作者:yipwinghong    | 项目源码 | 文件源码
def __init__(self, legend, *fields, **kwargs):
        self.description = kwargs.pop('description', None)
        self.collapsed = kwargs.pop('collapsed', None)
        super(Fieldset, self).__init__(legend, *fields, **kwargs)
项目:xadmin_python3    作者:mahongquan    | 项目源码 | 文件源码
def __init__(self, legend, *fields, **kwargs):
        self.description = kwargs.pop('description', None)
        self.collapsed = kwargs.pop('collapsed', None)
        super(Fieldset, self).__init__(legend, *fields, **kwargs)
项目:Django-shop    作者:poetries    | 项目源码 | 文件源码
def __init__(self, legend, *fields, **kwargs):
        self.description = kwargs.pop('description', None)
        self.collapsed = kwargs.pop('collapsed', None)
        super(Fieldset, self).__init__(legend, *fields, **kwargs)
项目:MoocOnline    作者:My-captain    | 项目源码 | 文件源码
def __init__(self, legend, *fields, **kwargs):
        self.description = kwargs.pop('description', None)
        self.collapsed = kwargs.pop('collapsed', None)
        super(Fieldset, self).__init__(legend, *fields, **kwargs)
项目:followme    作者:wzqnls    | 项目源码 | 文件源码
def __init__(self, legend, *fields, **kwargs):
        self.description = kwargs.pop('description', None)
        self.collapsed = kwargs.pop('collapsed', None)
        super(Fieldset, self).__init__(legend, *fields, **kwargs)
项目:mxonline    作者:huwei86    | 项目源码 | 文件源码
def __init__(self, legend, *fields, **kwargs):
        self.description = kwargs.pop('description', None)
        self.collapsed = kwargs.pop('collapsed', None)
        super(Fieldset, self).__init__(legend, *fields, **kwargs)
项目:mes    作者:osess    | 项目源码 | 文件源码
def __init__(self, legend, *fields, **kwargs):
        self.description = kwargs.pop('description', None)
        self.collapsed = kwargs.pop('collapsed', None)
        super(Fieldset, self).__init__(legend, *fields, **kwargs)
项目:Charlotte    作者:LiZoRN    | 项目源码 | 文件源码
def __init__(self, legend, *fields, **kwargs):
        self.description = kwargs.pop('description', None)
        self.collapsed = kwargs.pop('collapsed', None)
        super(Fieldset, self).__init__(legend, *fields, **kwargs)
项目:imooc-django    作者:zaxlct    | 项目源码 | 文件源码
def __init__(self, legend, *fields, **kwargs):
        self.description = kwargs.pop('description', None)
        self.collapsed = kwargs.pop('collapsed', None)
        super(Fieldset, self).__init__(legend, *fields, **kwargs)
项目:muxueonline    作者:124608760    | 项目源码 | 文件源码
def __init__(self, legend, *fields, **kwargs):
        self.description = kwargs.pop('description', None)
        self.collapsed = kwargs.pop('collapsed', None)
        super(Fieldset, self).__init__(legend, *fields, **kwargs)