We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello,
I'm trying to filter a queryset using a method instead of field_name, but I can't get the method to be called.
Here is my code:
class CustomerMasterGlobalFilter(DatatablesFilterSet):
best_account_address = CharFilter(method='address_filter') class Meta: model = CustomerMaster fields = ["best_account_address"] def address_filter(self, queryset, name, value): print("filter called")
I realize I'm supposed to return a queryset with the method, but I can't even get the statement to print. It just doesn't do anything.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello,
I'm trying to filter a queryset using a method instead of field_name, but I can't get the method to be called.
Here is my code:
class CustomerMasterGlobalFilter(DatatablesFilterSet):
I realize I'm supposed to return a queryset with the method, but I can't even get the statement to print. It just doesn't do anything.
The text was updated successfully, but these errors were encountered: