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

add support for all django-filters RangeFilter #332

Merged
merged 1 commit into from
Mar 18, 2021

Conversation

juleswh
Copy link
Contributor

@juleswh juleswh commented Mar 11, 2021

Attempt to support all django-filters RangeFilters.

existing tests pass, I probably should make tests for some other cases.

I tried it on a project using DateFromToRangeFilter and it works as expected (with date_before and date_after query parameters)

@codecov
Copy link

codecov bot commented Mar 12, 2021

Codecov Report

Merging #332 (7eefb2a) into master (aa13210) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #332   +/-   ##
=======================================
  Coverage   98.09%   98.09%           
=======================================
  Files          54       54           
  Lines        4945     4946    +1     
=======================================
+ Hits         4851     4852    +1     
  Misses         94       94           
Impacted Files Coverage Δ
drf_spectacular/contrib/django_filters.py 87.36% <100.00%> (+0.13%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aa13210...7eefb2a. Read the comment docs.

@tfranzel tfranzel merged commit 7eefb2a into tfranzel:master Mar 18, 2021
@tfranzel
Copy link
Owner

thanks @juleswh! i just robustified this a little and added support for

class LookupChoiceWidget(SuffixedMultiWidget):
    suffixes = [None, 'lookup']

@juleswh
Copy link
Contributor Author

juleswh commented Mar 19, 2021

Nice, thanks for taking it over!

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.

None yet

2 participants