test_forms.py 文件源码

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

项目:NZ-ORCID-Hub 作者: Royal-Society-of-New-Zealand 项目源码 文件源码
def test_form():  # noqa
    class F(Form):
        pdf1 = PartialDateField("f1", default=PartialDateDbField(1995), id="test-id-1")
        pdf2 = PartialDateField("f2", default=PartialDateDbField(2017, 5, 13), id="test-id-2")
        pdf3 = PartialDateField("f3")
        csf1 = CountrySelectField()
        csf2 = CountrySelectField(label="Select Country")
        bmvf1 = BitmapMultipleValueField(choices=[
            (
                1,
                "one",
            ),
            (
                2,
                "two",
            ),
            (
                4,
                "four",
            ),
        ])
        bmvf2 = BitmapMultipleValueField(
            choices=[
                (
                    1,
                    "one",
                ),
                (
                    2,
                    "two",
                ),
                (
                    4,
                    "four",
                ),
            ], )
        bmvf2.is_bitmap_value = False

    return F
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号