我不知道如何在django-filter app中使用MethodFilter,我在文档中找不到它(http://django-filter.readthedocs.org/en/latest/index.html).我需要创建过滤器,使用from和to输入日期字段.您是否知道如何使用MethodFilter或其他方式执行此操作?
我有一些课:
class Product(django_filters.FilterSet):
class Meta:
model = Product
fields = ['name', 'category', 'created_at]
Run Code Online (Sandbox Code Playgroud)
我有字段created_at,我想通过created_at(from和to)过滤产品.