DatastoreUsagePatterns

From OLPC
Revision as of 22:38, 20 January 2008 by 72.255.6.235 (talk) (New page: == Record == jobject = datastore.create() jobject.metadata['title'] = 'Record activity...' jobject.metadata['... f = open(temp_path_in_instance_dir, 'w') f.write(session_data) f.c...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Record

jobject = datastore.create()
jobject.metadata['title'] = 'Record activity...'
jobject.metadata['...

f = open(temp_path_in_instance_dir, 'w')
f.write(session_data)
f.close()

jobject.file_path = temp_path_in_instance_dir
datastore.write(jobject)