django-elasticsearch-dsl-drf
django-elasticsearch-dsl-drf copied to clipboard
Fix AggsProxy import with elasticsearch-dsl team approach
See this comment by @miguelgrinberg (elasticsearch-dsl team @ Elastic).
This PR fixes the import issue in a future-proof way, while still being backward compatible.
AggsProxy can't be imported | functional.py | utils.py (Tested with elasticsearch-dsl==8.13.1 & django==5.0.4)
Testing instructions:
- Remove the old version of django-elasticsearch-dsl-drf from a project that generates this error
pip uninstall django-elasticsearch-dsl-drf
- Install this version
pip install git+https://github.com/millerf/django-elasticsearch-dsl-drf@fix/aggs-proxy-import-error
Run the server or some tests and verify it works.
Should fix #314 and close #315 #316 #318 (that took the same non-future-proof approach)
@barseghyanartur
There is some work needed to properly fix it, however I don't know enough of this plugin to properly do that.
Great working on my side. Thank you