Skip to content

Conversation

@alexdashkov
Copy link
Contributor

Review

This PR closes #

  • Tests
  • Docs/comments
    • IN CASE YOU'VE CHANGED THE formidable.yml file: run tox -e swagger-statics to rebuild the swagger static files and commit the diff.
  • Migration(s)
  • CHANGELOG.rst Updated
  • Delete your branch

Copy link

@syldb syldb left a comment

Choose a reason for hiding this comment

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

LGTM

help_text = models.TextField(null=True, blank=True)
multiple = models.BooleanField(default=False)
order = models.IntegerField()
parameters = JSONField(null=True, blank=True, default={})
Copy link

Choose a reason for hiding this comment

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

Why do we need blank and null while there is a default value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a habit for the Django models. When you use it from the admin panel, you can't save a blank field if you haven't specified null=True, blank=True even with a declared default value. Maybe it's an overkill here but I'd like to keep it.

model_name='field',
name='parameters',
field=jsonfield.fields.JSONField(
blank=True, default={}, null=True
Copy link
Contributor

Choose a reason for hiding this comment

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

I think that the best would be to merge this migration with the 0009, and keep its "semantic" name, instead of the automatically generated one.

Copy link

Choose a reason for hiding this comment

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

Ok for me, do you want to do it?

Copy link

@syldb syldb left a comment

Choose a reason for hiding this comment

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

LGTM

brunobord and others added 2 commits August 20, 2018 11:02
…lds that go beyond the classical / usual fields available in `django-formidable`.

* Added a documentation on how to create a new external field module,
* Added a new field in the models to carry the parameters. By default, this field is not (de)serialized, you'll need to activate it by hand as explained in the docs and handle its validation by yourself.
@alexdashkov
Copy link
Contributor Author

@brunobord do you have some other suggestions?

Copy link
Contributor

@brunobord brunobord left a comment

Choose a reason for hiding this comment

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

LGTM. I'll add a warning in the RC changelog about the fact that only the builder is integrated.

@alexdashkov alexdashkov merged commit 30bd85f into master Aug 20, 2018
@alexdashkov alexdashkov deleted the plugin-mechanism branch August 20, 2018 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants