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

Search: refactor API to not emulate a Django queryset #7114

Merged
merged 4 commits into from May 28, 2020

Conversation

stsewd
Copy link
Member

@stsewd stsewd commented May 21, 2020

The recommended way of using pagination over
a custom object is to manage the class ourselves.
I tried to rely on most of the defaults of the DRF's pagination class.

The API response is the same as before, we can extend it to return information about facets later.
Some method were moved around, but the logic is the same.

Closes #5235

stsewd added 2 commits May 21, 2020
The recommended way of using pagination over
a custom object is to manage the class ourselves.
I tried rely on most of the defaults of the DRF's pagination class.

Closes #5235
@stsewd stsewd requested a review from ericholscher May 21, 2020
Copy link
Member

@ericholscher ericholscher left a comment

This looks like a solid refactor 👍

readthedocs/search/api.py Show resolved Hide resolved
readthedocs/search/api.py Show resolved Hide resolved
readthedocs/search/api.py Outdated Show resolved Hide resolved
@stsewd stsewd merged commit e4973ea into master May 28, 2020
2 checks passed
@stsewd stsewd deleted the refactor-search-apiview branch May 28, 2020
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