jmrivas86/django-json-widget

Getting render() got an unexpected keyword argument 'renderer' in Django 2.1.1

Closed this issue · 1 comments

  • django-json-widget version: 0.1.1
  • Django version: 2.1.1
  • Python version: 3.6.5
  • Operating System: MacOS High Sierra 10.13.6

Description

Getting error when following the default installation instructions.

TypeError at /admin/core/user/5/change/
render() got an unexpected keyword argument 'renderer'

What I Did

Steps to reproduce:

  1. pip install django-json-widget
  2. settings.py
    ...
    'django_json_widget',
    ...
]
  1. admin.py
from django_json_widget.widgets import JSONEditorWidget

class JsonAdmin(admin.ModelAdmin):
  formfield_overrides = {
    JSONField: {'widget': JSONEditorWidget }
  }

@admin.register(DuitUser)
class UserAdmin(JsonAdmin):
    list_display = ('first_name', 'last_name', 'mobile_number')
  1. Open localhost:8000/admin in browser. You should see the error Exception Value: | render() got an unexpected keyword argument 'renderer'

Possible reasons

This is almost certainly because of this backwards-incompatible change in Django 2.1.
https://stackoverflow.com/a/52039655/842837

I close this issue because I already uploaded on PYPI a new version and fixed it. Thanks for waiting