def get_form_schema(form):
schema = {<EOL>'<STR_LIT:type>': '<STR_LIT:object>',<EOL>'<STR_LIT>': {},<EOL>}<EOL>for name, field in form.base_fields.items():<EOL><INDENT>schema['<STR_LIT>'][name] = get_field_schema(name, field)<EOL>if field.required:<EOL><INDENT>schema.setdefault('<STR_LIT>', []).append(name)<EOL><DEDENT><DEDENT>return schema<EOL>
Return a JSON Schema object for a Django Form.