jmrivas86 / django-json-widget

An alternative widget that makes it easy to edit the new Django's field JSONField (PostgreSQL specific model fields)
MIT License
433 stars 88 forks source link

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

Closed prakhar-goel closed 5 years ago

prakhar-goel commented 5 years ago

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',
    ...
    ]
  3. 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')


4. 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://docs.djangoproject.com/en/2.1/releases/2.1/#features-removed-in-2-1).
https://stackoverflow.com/a/52039655/842837
jmrivas86 commented 5 years ago

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