Skip to content

Instantly share code, notes, and snippets.

@hughes
Created March 6, 2013 14:41
Show Gist options
  • Save hughes/5099725 to your computer and use it in GitHub Desktop.
Save hughes/5099725 to your computer and use it in GitHub Desktop.
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