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

Move filtermethods to apis_core.utils.filtermethods #153

Merged
merged 3 commits into from
Oct 11, 2023
Merged

Conversation

b1rger
Copy link
Contributor

@b1rger b1rger commented May 4, 2023

  • refactor: move filtermethods from apis_entities to utils;
  • docs: reference utils.filtermethods in configuration
  • tests: add tests for utils.filtermethods.construct_lookup

Closes: #152

@b1rger b1rger force-pushed the birger/move-filters branch 3 times, most recently from b9c31bf to ffdfdfb Compare May 4, 2023 09:06
@b1rger b1rger marked this pull request as ready for review May 4, 2023 09:09
@b1rger b1rger force-pushed the birger/move-filters branch from ffdfdfb to 700e7f3 Compare May 4, 2023 09:12
@b1rger b1rger requested a review from richardhadden May 4, 2023 09:19
@b1rger b1rger force-pushed the birger/move-filters branch 3 times, most recently from c78950b to 1ff7073 Compare June 2, 2023 06:27
@b1rger b1rger requested review from a team and removed request for richardhadden June 7, 2023 16:12
@b1rger b1rger force-pushed the birger/move-filters branch 2 times, most recently from 344871e to 42ddec0 Compare October 11, 2023 08:35
The apis_entities.filters.GenericEntityListFilter contained some filter
methods (as defined in
https://django-filter.readthedocs.io/en/main/ref/filters.html#method)
and a helper method. Both could be useful to other modules. Therefore
those methods are being moved out of the GenericEntityListFilter to
`utils.filtermethods`.
In the GenericEntityListFilter the previously defined `name` filter is
not being used anymore.
The function names in the `apis_core.utils.filtermethods` module were
renamed and harmonized, as to not end in `_method` or `_filter`.
BREAKING CHANGE: if the GenericEntityListFilter was used with the
`method` set to one of the included methods, the `method` attribute
should now point to `apis_core.utils.filtermethods...`

Closes: #152
@b1rger b1rger merged commit ba5f343 into main Oct 11, 2023
@b1rger b1rger deleted the birger/move-filters branch October 11, 2023 11:23
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.

Move filtermethods to apis_core.utils.filtermethods
1 participant