Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def deserialize(self, obj):
- pdb.set_trace()
- data = {"@type": "File","title": "My file","file": {"data":"SSBib3VnaHQgbmV3IGlQaG9uZTcgMTI4Rw==","encoding": "base64","filename": "iPhone7.txt","content-type": "text/plain"},"description": "new temp text file","Path": "/plone/talks/file1"}
- type_ = data.get('@type', None)
- path_ = data.get('Path', None)
- title = data.get('title', None)
- try:
- new_id = self.context.invokeFactory(type_, path_, title=title)
- except:
- print 'error in raising new key'
- obj=self.context[new_id]
- deserializer = queryMultiAdapter((obj, self.request), IDeserializeFromJson)
Add Comment
Please, Sign In to add comment