I'm creating a Django site and I would like to add dynamically generated forms based on JSON description which will come from an external source.
E.g. something like this:
[
{
"name": "first_name",
"label": "First Name",
"type": "char",
"max_length": 30,
"required": 1
},
{
"name": "last_name",
"label": "Last Name",
"type": "char",
"max_length": 30,
"required": 1
},
]
Would then give me a simple Django form with two CharField
s which I would display to a user and save the values he/she puts in for further processing.
I searched but didn't find any app creating Django forms from JSON like this. I can write such app myself, I just wanted to know if there is anything already.
If not, do you at least know about any JSON schema format that would allow to describe forms? Again, I can come up with it myself but I wanted to have a look at some examples so I don't omit important possibilities and have something solid to start with.
Thanks!