Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
linxi-1214 opened this issue Nov 25, 2022 · 0 comments

Comments

@linxi-1214
Copy link

自动生成的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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant