Closed theGOTOguy closed 6 years ago
Oh, I see that your tests are broken because your continuous CI is set to use the newest Django version where the tests themselves are broken by newly-required fields. I only tested against 1.11, and then copied the changed file into my Django 2.0 project using django-partial-index.
Thanks for the PR! I'll merge and then fix the tests today.
@mattiaslinnap any chance of getting this merged and into a new release?
Hi @vesterbaek, @theGOTOguy, @sjamaan,
Adding support for Django 2.0 was a little bit trickier than I expected - the "CREATE INDEX ..." templates and parameters have been moved from the Index class to SchemaEditor in Django 2.0.
I have an attempt that looks good ready in branch: https://github.com/mattiaslinnap/django-partial-index/tree/django20
It seems to pass tests for various combinations of Python and Django version: https://travis-ci.org/mattiaslinnap/django-partial-index/builds/324252456
However, it will take me some days to update my projects to Django 2.0 for real production testing.
Could you please try installing django-partial-index with
pip install git+https://github.com/mattiaslinnap/django-partial-index.git@django20
and let me know if it looks good for public release?
Very nice! I've upgraded my project to Django 2.0 and everything seems to work as it should.
Of course, to test it in my project I also had to rebase my changes from #5 onto this version (in another branch: https://github.com/CodeYellowBV/django-partial-index/tree/django2), so once you decide to release this I can update that pull request to work for Django 2 as well.
Ho @mattiaslinnap. Thanks. Yup, this works for me on 2.0
Version 0.4.0 with Django2 support is now available on PyPI, and as a release on github.
Thanks. Appreciated. Have a good weekend
In Django 2.0, positional arguments are no longer accepted by model.Index. With this tiny change django-partial-index is now Django 2.0 compatible.