Created
June 8, 2011 01:02
-
-
Save natea/1013576 to your computer and use it in GitHub Desktop.
This file contains 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 CardResource(ModelResource): | |
... | |
def post_list(self, request, **kwargs): | |
deserialized = self.deserialize(request, request.raw_post_data, \ | |
format=request.META.get('CONTENT_TYPE', 'application/json')) | |
bundle = self.build_bundle(data=dict_strip_unicode_keys(deserialized)) | |
self.is_valid(bundle, request) | |
updated_bundle = self.obj_create(bundle, request=request, user=request.user) | |
updated_bundle.obj.get_tracks() | |
updated_bundle.obj.get_track_urls() | |
return self.create_response(request, self.full_dehydrate(bundle.obj)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment