Closed mlavin closed 6 years ago
In Django 1.11, the signature of widget.build_attrs
was changed from (self, extra_attrs=None, **kwargs)
to (self, base_attrs, extra_attrs=None)
. Adapting the signature of widgets present in this project fixes the tests on Django 1.11. See this branch: https://github.com/mlavin/django-selectable/compare/master...raphaelmerx:django_111?expand=1
To do:
django_111
branch above so that tests pass on both Django 1.10 and 1.11. I have addressed the crashing bugs in widget rendering in my PR #189
I didn't use @raphaelmerx 's branch as a start, since the strategy needs to be quite different to achieve compat with both 1.11 and earlier. I also didn't address deprecation warnings in unrelated things, but that can wait for another PR.
I've found that while the above is necessary for supporting 1.11, it's not enough.
In particular, the new template based widget rendering in 1.11 means that for multiwidgets, the 'render' method of the subwidgets does not get called. This means that LookupMultipleHiddenInput.render
does not get called, resulting in bugs. I have a test that demonstrates this, but a fix is harder.
I think this can be closed now that #189 has been merged, and version 1.1 released
:+1:
The template based widget rendering is causing a number of issues for this project (at least in the test suite): https://docs.djangoproject.com/en/1.11/releases/1.11/#template-based-widget-rendering This seems like a non-trivial amount of work and may require dropping support for older Django versions.