charettes / django-colorful

Extension to the Django web framework that provides database and form color fields
https://pypi.python.org/pypi/django-colorful
MIT License
169 stars 58 forks source link

Django 2.1 stopped supporting widgets without explicit renderer arg definition #47

Closed MarianoFontana closed 6 years ago

MarianoFontana commented 6 years ago

As we can see in the release notes for Django 2.1 (https://docs.djangoproject.com/en/2.1/releases/2.1/):

Support for Widget.render() methods without the renderer argument is removed.

As the ColorFieldWidget render method does not have a renderer kwarg, it fails when rendering:

def render(self, name, value, attrs={}):

It should be enough to just add:

def render(self, name, value, attrs={}, **kwargs):
charettes commented 6 years ago

Fixed in b4fc970b18fce549083f118e604f92820dd4fb94, a version with the commit should be released early next week.