如何在django_filters.DateFromToRangeFilter中为每个小部件设置标签?

时间:2017-10-06 12:06:32

标签: django django-filters

如何设置标签'开始日期'小部件[0]和结束日期'到DateFromToRangeFilter中的widget [1]?

class CasesFilter(django_filters.FilterSet):
    datelastupdate=DateTimeFromToRangeFilter()
    testtime=DateTimeFromToRangeFilter(widget=RangeWidget(attrs={'placeholder': 'DD.MM.YYYY HH:SS'}))
    class Meta:
        model = ListOfCases
        fields=['id_test' ,
                'datelastupdate',
                'testtime',
                'active_flag',
                'version'
        ]

0 个答案:

没有答案