springload / wagtaildraftail

🐦📝🍸 Draft.js editor for Wagtail, built upon Draftail and draftjs_exporter
https://pypi.python.org/pypi/wagtaildraftail
MIT License
24 stars 3 forks source link

Django since 1.11 calls `widget.render` with named arguments, not positionals #51

Closed dnsl48 closed 7 years ago

dnsl48 commented 7 years ago

Django 1.10 (and earlier) makes an invocation of the widget.render method passing arguments using positional propagation: https://github.com/django/django/blob/1.10.7/django/forms/boundfield.py#L101

force_text(widget.render(name, self.value(), attrs=attrs))

Django 1.11 (and later) changes this invocation so that arguments bound to names: https://github.com/django/django/blob/1.11/django/forms/boundfield.py#L116

html = widget.render(
        name=name,
        value=self.value(),
        attrs=attrs,
        **kwargs
    )

This implies that from now onwards the attribute names are significant.

Also, there was a new attribute introduced: renderer, which becomes mandatory since django 2.1

dnsl48 commented 7 years ago

fix implemented, tests are coming