-
Notifications
You must be signed in to change notification settings - Fork 13
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
Django 4 support: Option 5, migrating to django-filter #491
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BREAKING: This patch makes mreg require python3.9+. Fixes unioslo#487 This solution implements option 3 and/or 4, using dj-url-filter. Testing infrastructure: - Migrate testing to tox. - Migrate coverage configuration to tox. - Coverage is not run as a default environment by tox. - Locally, one can do `tox -e coverage` to run coverage. - Coverage called by tox fails if it drops below 98%. - `coverage run manage.py test && coverage report -m` also works. - Increase testing scope, via tox the following is now tested: - Django3.2 on python3.9 - Django4.0 on python3.9-3.11 - Django4.1 on python3.10-3.11 - Django4.2 (pre-release) on python3.10-3.11 - Django main branch on python3.11 Dependency changes: - To test against Django4.2, django-rest-framework had to be updated to 3.14.0 - django-url-filter==0.3.15 replaced with dj-url-filter==0.4.4. File additions: - Created a requirements-test.txt file that contains all dependencies required for testing.
Fixes unioslo#487 by implementing option 5 in the issue. Supports: python3.7+, django 3.2+. Tests included for this range. Breaking changes: None This implementation uses django-filter as intended. It sets a default filter backend and uses standard filter_class models where possible. Exceptions take place in the following views: - HostList. Relies on manipulating the queryset, and said manipulation is also used in the filter-less HostDetail. - *Zone*List. The abstraction model for these views is based around propagating a filterset into the parent class. Concerns: - This patch creates explicit mapping filters for JSONField and CIDRField. It is unclear how well-tested these are.
terjekv
changed the title
Migrate-to-django-filter
Django 4 support: Option 5, migrating to django-filter
Mar 29, 2023
Doing a close / reopen to see if tests will run. |
Superseded by #492. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #487 by implementing option 5 in the issue.
Supports: python3.7+, django 3.2+. Tests included for this range.
Breaking changes: None
This implementation uses django-filter as intended. It sets a default filter backend and uses standard filter_class models where possible.
Exceptions take place in the following views:
HostList
. Relies on manipulating the queryset, and said manipulation is also used in the filter-less HostDetail.*Zone*List
. The abstraction model for these views is based around propagating a filterset into the parent class.Concerns: