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

feat: support a initial (default) filter's value be a callable #56

Merged
merged 3 commits into from
Jun 21, 2024

Conversation

lucasgomide
Copy link
Contributor

No description provided.

@lucasgomide lucasgomide force-pushed the lg-callable-filter-initial branch 3 times, most recently from 3f2e083 to 3b4f36f Compare June 21, 2024 16:36
@lucasgomide lucasgomide force-pushed the lg-callable-filter-initial branch 2 times, most recently from 69bd989 to 218dc6b Compare June 21, 2024 17:43
When the value is set by Field.initial, it turns into a list of lists because each field in the query parameters (set up at the Django view layer) defaults to being a list
Previosly the initial filter value only accept literal value, after this change it will accept a callable to process complex operations
@lucasgomide lucasgomide force-pushed the lg-callable-filter-initial branch from 218dc6b to c8e900a Compare June 21, 2024 17:47
Ruff does not support multiple target versions; it only supports the minimum versions. Since we want to support Python 3.11 in CI, it is better to change the target version.
@lucasgomide lucasgomide force-pushed the lg-callable-filter-initial branch from c8e900a to 3e453fd Compare June 21, 2024 17:56
@joaodaher joaodaher merged commit 1937276 into main Jun 21, 2024
6 of 9 checks passed
@joaodaher joaodaher deleted the lg-callable-filter-initial branch June 21, 2024 18:04
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

Successfully merging this pull request may close these issues.

2 participants