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 base_ordering to OrderingFilter #1115

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kkirss
Copy link

@kkirss kkirss commented Aug 4, 2019

base_ordering is an optional argument that allows you to specify a set of fields that will be given to order_by() after any provided ordering options. This is useful if you filter by a non-unique field but want an unique field to serve as a base. Django guarantees a consistent order only for querysets with at least one unique ordering field. Consistent ordering is important for things like pagination.

@codecov-io
Copy link

codecov-io commented Aug 4, 2019

Codecov Report

Merging #1115 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1115      +/-   ##
==========================================
+ Coverage    98.1%   98.12%   +0.02%     
==========================================
  Files          15       15              
  Lines        1216     1229      +13     
==========================================
+ Hits         1193     1206      +13     
  Misses         23       23
Impacted Files Coverage Δ
django_filters/filters.py 99.71% <100%> (+0.01%) ⬆️

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 da4b64e...995bf5e. Read the comment docs.

Base automatically changed from master to main March 3, 2021 08:48
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