django-jsonform
django-jsonform copied to clipboard
Add schema support for `ArrayField`
Looks like it's not implemented right now. Would love to have this supported. Thoughts?
I'll have to think about this.
Meanwhile, you can override the schema using a custom form:
# models.py
class MyModel(...):
my_array = ArrayField(...)
# forms.py
class MyModelForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# Provide custom schema
self.fields['my_array'].widget.schema = {'type': 'array', ...}
# admin.py
class MyAdmin(admin.ModelAdmin):
form = MyModelForm
...
I am @ghost