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
Add field optional dehydrate method param #1536
Add field optional dehydrate method param #1536
Conversation
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.
Thanks for this - looks great. I had a couple of minor comments.
I have made the changes. Also deleted the deprecation warning from exceptions module. Thanks for the suggestions and explanations regarding the changes, if anything else needs to be changed let me know! |
Looks great, almost ready to merge. Re backticks, I suggest remove these from the Feel free to add your name to AUTHORS (optional), and then I will merge. |
Ah lol ok now it makes sense. Will make these changes |
Great thanks |
Problem
Defining custom methods for dehydration of the field
I have had situations where I had to dynamically generate new fields during export. In this case I wasn't able to pre-define dehydration methods in
ModelResource
so I addeddehydrate_method
parameter toField
which solved this issue.Solution
I have added
dehydrate_method
parameter tofields.Field
so custom methodsAcceptance Criteria
Have you written tests? Have you included screenshots of your changes if applicable?
I have written tests.
Did you document your changes?
Added docstrings.
Let me know if anything needs to be changed!