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

[wip] Rework related filtering #197

Closed
wants to merge 4 commits into from

Conversation

rpkilby
Copy link
Collaborator

@rpkilby rpkilby commented Oct 24, 2017

This is a first pass at solving #99 & #100. I'm mostly happy with the state of this, but there are a lot of tests that need to be written. Additionally, displaying related forms is not possible with this implementation, so I'm trying a second approach.

That all said, here is what this PR would enable:

  • Correct behavior when filtering across to-many relationships (ref).
  • Related Filters can now enforce queryset restrictions. (eg, only display related articles that have been published or are authored by the request user).
  • No longer necessary to customize method filters (previously requires munging the name).
  • Filtering on related annotations.

@rpkilby rpkilby added this to the v1.0.0 milestone Oct 24, 2017
@codecov-io
Copy link

codecov-io commented Oct 24, 2017

Codecov Report

Merging #197 into master will increase coverage by 0.54%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #197      +/-   ##
==========================================
+ Coverage   97.93%   98.47%   +0.54%     
==========================================
  Files           4        4              
  Lines         242      263      +21     
  Branches       51       52       +1     
==========================================
+ Hits          237      259      +22     
  Misses          1        1              
+ Partials        4        3       -1
Impacted Files Coverage Δ
rest_framework_filters/filterset.py 99.2% <100%> (+1.12%) ⬆️

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 379e363...eb652e0. Read the comment docs.

@rpkilby rpkilby removed this from the v1.0.0 milestone Jul 14, 2018
@rpkilby rpkilby closed this Jul 14, 2018
@rpkilby rpkilby deleted the rework-related-filtering branch July 23, 2018 17:50
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