Module memo
source code
Code to handle memo/note items
The format for the memo is standardized. It is a dict with the following
fields:
MemoEntry properties:
subject - 'string subject'
text - 'string text'
categories - [{ 'category': 'string' }]
secret - True/<False|None>
date - date time/stamp 'Mmm dd, YYYY HH:MM' (Read only)
id - unique id string that can be used as a dict key.
MemoEntry methods:
get() - return a copy of the memo dict.
set(dict) - set the internal dict to the new dict.
set_date_now() - set the date/time stamp to the current date/time
set_date_isostr(iso_string) - set the date/time stamp to the ISO date string
(YYYYMMDDTHHMMSS)
To implement memo read/write for a phone module:
Add 2 entries into Profile._supportedsyncs:
...
('memo', 'read', None), # all memo reading
('memo', 'write', 'OVERWRITE') # all memo writing
implement the following 2 methods in your Phone class:
def getmemo(self, result):
...
return result
def savememo(self, result, merge):
...
return result
The result dict key is 'memo'.
|
widgets_list = [ ]
|
|
module_debug = False
|
|
memoobjectfactory = database.dataobjectfactory(MemoDataObject)
|