Skip to content

Instantly share code, notes, and snippets.

@bohde
Created February 2, 2011 18:45
Show Gist options
  • Save bohde/808156 to your computer and use it in GitHub Desktop.
Save bohde/808156 to your computer and use it in GitHub Desktop.
bundle.data['max_responses'] -> None
bundle.obj.max_responses -> 22
class EventResource (ModelResource):
max_responses = fields.IntegerField('max_responses', null=True)
...
def obj_update (self, bundle, request=None, **kwargs):
print "bundle.data['max_responses'] -> ", bundle.data.get('max_responses')
bundle = super (EventResource, self).obj_update(bundle, request, **kwargs)
print "bundle.obj.max_responses -> ", bundle.obj.max_responses
return bundle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment