Created
March 6, 2013 14:41
-
-
Save hughes/5099725 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class YourResource(ModelResource): | |
custom_field = fields.CharField() | |
def dehydrate_custom_field(self, bundle): | |
return "this is a custom field" | |
def hydrate_custom_field(self, bundle): | |
do_something_with(bundle.data.get('custom_field', 'default')) | |
return bundle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment