Hackpads are smart collaborative documents. .

Xing Chen

590 days ago
Unfiled. Edited by Xing Chen 590 days ago
  • Serialize a single Review Request along with necessary objects.
  • Deserialize a single Review Request from file.
  • I am currently trying this method. I am using a dictionary to hold uuid-object paired. When an object is deserialized, I put its uuid and its reference into the map. And when establishing FK and m2m relations, I look up the dictionary, find the object represented by the uuid, and get its pk.
  • One assumption made is that there will be no IntegrityError during deserialiazation. This is not a valid assumption since there can be users with the same user name, or review requests with same unique together fields. 
  • Therefore some extensions of this project it to allow use to change local site name if it's already in use. And detect if a user is trying to import a file once again. 
  • Also I am using an in-memory dictionary to keep uuid to object relations. This works with small amount of review requests. However a permanent storage is needed such as a db, if we are dealing with huge volume of review requests.
  • I am not exporting file attachment in my json dump.

Contact Support

Please check out our How-to Guide and FAQ first to see if your question is already answered! :)

If you have a feature request, please add it to this pad. Thanks!

Log in