We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I would like to supply a JSON-schema to the widget, and the widget ensures that the field content is validate according to the JSON schema provided.
The text was updated successfully, but these errors were encountered:
You can give that via the options
JSONEditorWidget( options={ "schema": self.acl_schema, } )
Sorry, something went wrong.
i used it with dynamic json schema stored in a related model. Id dit it by overriding get_form method :
def get_form(self, request, obj=None, change: bool = False, **kwargs): my_form = super().get_form(request, obj, change, **kwargs) categorie_spec = Categorie.objects.get( id=obj.categorie_id ).specifications_schema my_form.base_fields["specifications"].widget = JSONEditorWidget( options={"schema": categorie_spec} ) return my_form
No branches or pull requests
Description
I would like to supply a JSON-schema to the widget, and the widget ensures that the field content is validate according to the JSON schema provided.
The text was updated successfully, but these errors were encountered: