mtianyan / django-react-tyadmin

支持Python3.9,Django4! 类似 xadmin 的基于Model 快速生成前后台管理增删改查,筛选,搜索的后台管理自动化工具。Antd 界面好看现代化!前后端分离!无损二次开发!由Django Restful Framework 和 Ant Design Pro V4 驱动
https://tyadmin.funpython.cn/xadmin
MIT License
860 stars 196 forks source link

django-filter 的属性字段有变更,导致filter不起作用,有相同问题的可以参考 #46

Open linxi-1214 opened 1 year ago

linxi-1214 commented 1 year ago

自动生成的filter,采用的字段是filter_class 和 filter_fields 但是我的filter不起作用,我看了一下django_filter 发现其属性字段有变更: https://django-filter.readthedocs.io/en/main/guide/migration.html

View attributes renamed (#867)

Several view-related attributes have been renamed to improve consistency with other parts of the library. The following classes are affected:

DRF ViewSet.filter_class => filterset_class
DRF ViewSet.filter_fields => filterset_fields
DjangoFilterBackend.default_filter_set => filterset_base
DjangoFilterBackend.get_filter_class() => get_filterset_class()
FilterMixin.filter_fields => filterset_fields