Skip to content
This repository has been archived by the owner on Jul 9, 2020. It is now read-only.

Generalized json-widget to handle non-config fields #74

Merged

Conversation

redhog
Copy link
Contributor

@redhog redhog commented Mar 16, 2018

class MyForm(BaseForm):
    class Meta(BaseForm.Meta):
        widgets = {'my_field': JsonSchemaWidget(attrs={
                                                     # Only use one of these two options at a time
                                                     'data-schema': 'my-schema',
                                                     'data-schema-selector': '#my-dropdown-field',
                                                     # Options for the json-editor
                                                     'data-options': json.dumps({
                                                         "disable_collapse": False,
                                                         "disable_edit_json": False,
                                                         "display_required_only": True
                                                     })})}

The diff looks bigger than it actually is, since it unindented a whole block one level...

@coveralls
Copy link

coveralls commented Mar 16, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling f9381be on innovationgarage:generalized-json-widget into cd7fbb4 on openwisp:master.

Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@redhog sorry for the delay, thank you for contributing 👍

@nemesifier nemesifier merged commit 4acf6fd into openwisp:master Jul 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants