New issue
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
Let CLI package use custom Marshmallow Field definitions #125
Let CLI package use custom Marshmallow Field definitions #125
Conversation
By moving our custom DurationField to the data package, I also had to move our custom DurationValidationError and FMValidationError definitions there, to avoid having the data package import from the API package. I hope this is not problematic for you? If approved, I still need to write a changelog entry (and perhaps a documentation entry, too) about how this enables plugins to use FM marshmallow validators in a plugin's custom CLI function definition. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love this! Marshmallow for the win!
Instead of putting the new Mixin in data/models/fields.py
, I'd simply add it to data/schemas/utils.py
I think.
Given that there is now a schemas
directory somewhere in data
, it brings up the question if the big schemas (asset, user) should move out from the models
dir and into the schemas
dir.
|
…kage_use_custom_Marshmallow_Field_definitions
closes #124