jmrivas86/django-json-widget

Custom width height in config Form

Closed this issue · 1 comments

  • django-json-widget version: 0.2.0
  • Django version: 1.11
  • Python version: 3.4.5
  • Operating System: ubuntu 18.10

Description

How to use custom width and height in form django admin with key
JSONEditorWidget() . I cant found any example like this. I see configuration said :

width: Width of the editor as a string with CSS size units (px, em, % etc). Defaults to 90%.
height: Height of the editor as a string CSS size units. Defaults to 550px.

What I Did

My config work perfect, without it look so big

class ServiceForm(forms.ModelForm):
    class Meta:
        model = Service
        widgets = {
            'test': JSONEditorWidget(),
        }

i try JSONEditorWidget(with="50") But editor not accept this param

My pip list show version is 0.2.0. But in your project, file widgets.py have more param than my version pip downloaded. It maybe this problem.
thanks

I closed this issue, is solved in the latest version.