Skip to content
Snippets Groups Projects
Commit d2476d59 authored by Julian's avatar Julian
Browse files

Use correct options for file fields

parent 32998c2b
No related branches found
No related tags found
No related merge requests found
...@@ -103,11 +103,16 @@ class JSONSchema: ...@@ -103,11 +103,16 @@ class JSONSchema:
case forms.MultipleHiddenInput: case forms.MultipleHiddenInput:
... ...
case forms.FileInput: case forms.FileInput | forms.ClearableFileInput:
... new_field |= {
"type": "string",
case forms.ClearableFileInput: "contentMediaType": "image/*" if type(field) == forms.ImageField else "*",
... "writeOnly": True
}
# Fixme: differentiate between clearable and non-clearable
# case forms.ClearableFileInput:
# ...
case forms.Textarea: case forms.Textarea:
new_field["x-display"] = "textarea" new_field["x-display"] = "textarea"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment