jazzband / django-embed-video

Django app for easy embedding YouTube and Vimeo videos and music from SoundCloud.
http://django-embed-video.rtfd.org
MIT License
383 stars 135 forks source link

Add renderer kwarg to Widget render method to support Python 2.1 and later. #88

Closed mgrdcm closed 6 years ago

mgrdcm commented 6 years ago

The Admin widget currently doesn't work in Django>=2.1 because:

From: https://docs.djangoproject.com/en/1.11/ref/forms/widgets/#django.forms.Widget.render

Changed in Django 1.11: The renderer argument was added. Support for subclasses that don’t accept it will be removed in Django 2.1.

The automated tests should pass once #89 is merged into master and then into this branch.

mgrdcm commented 6 years ago

BTW in case anyone else runs into this, I'm currently using this code to work around the bug in Django>=2.1 until this PR gets merged and released: https://gist.github.com/mgrdcm/f6e62b7eac741e93082a82a91138b1f1

cedriccarrard commented 6 years ago

@mgrdcm Please look to correct the tests thanks.

mgrdcm commented 6 years ago

@CedricCarrard it was just a timeout - reran the tests and all passed!

mgrdcm commented 6 years ago

Thanks @CedricCarrard! Think this might now be ready for a 1.2.0 release so that the package works with Django 2.1? Would also close out #90. Happy to do anything else to help that process!