docs - update the example ColumnFilter#949
Merged
aminalaee merged 3 commits intoaminalaee:mainfrom Oct 2, 2025
proby-actvo:update-ColumnFilter-docs
Merged
docs - update the example ColumnFilter#949aminalaee merged 3 commits intoaminalaee:mainfrom proby-actvo:update-ColumnFilter-docs
aminalaee merged 3 commits intoaminalaee:mainfrom
proby-actvo:update-ColumnFilter-docs
Conversation
The `lookups` method requires a fourth, `run_query`, argument. The `get_filtered_query` method requires a fourth, `model`, argument. Also updated the docs, a minor clarification, that the above two are methods not fields.
birddevelper
suggested changes
Sep 2, 2025
docs/configurations.md
Outdated
| A ColumnFilter is a class that defines a filter for a column. A few standard filters are implemented in `sqladmin.filters` module. Here is an example of a generic ColumnFilter. Note that the fields `title`, `parameter_name`, `lookups` and `get_filtered_query` are required. | ||
|
|
||
| A ColumnFilter is a class that defines a filter for a column. A few standard filters are implemented in `sqladmin.filters` module. Here is an example of a generic ColumnFilter. Note that the fields `title` & `parameter_name` and the methods `lookups` & `get_filtered_query` are required. |
Contributor
There was a problem hiding this comment.
Hi @proby-actvo , Thanks for your contribution. I think this version can be more clear:
Suggested change
| A ColumnFilter is a class that defines a filter for a column. A few standard filters are implemented in `sqladmin.filters` module. Here is an example of a generic ColumnFilter. Note that the fields `title` & `parameter_name` and the methods `lookups` & `get_filtered_query` are required. | |
| A ColumnFilter is a class that defines a filter for a column. A few standard filters are implemented in `sqladmin.filters` module. Here is an example of a generic ColumnFilter. Note that the fields `title` and `parameter_name`, and the methods `lookups` and `get_filtered_query` are all required in a filter class. |
Contributor
Author
There was a problem hiding this comment.
Thanks @birddevelper -- good suggestions, much appreciated. I've adopted your suggestions.
* added "the" before "`sqladmin.filters` module" * changed "Here" to "Below" * changed "&" to "and" * added comma to clearly separate the fields from the methods * further clarify the requirement is in a filter class
broke the lines before 100 chars as that seems to be the most common breaking point in this file
birddevelper
approved these changes
Sep 3, 2025
aminalaee
approved these changes
Oct 2, 2025
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
lookupsmethod requires a fourth,run_query, argument.The
get_filtered_querymethod requires a fourth,model, argument.Also updated the docs, a minor clarification, that the above two are methods not fields.
It also looks like my editor removed some extra whitespace on save, I hope that's ok.
I'm also willing, if there's interest, to update the column filter code to add a
BaseFilter(ABC)base class for all filters. Something to help enforce API consistency. Roughly: