Skip to content

Commit

Permalink
documentation updates on publishchange methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Raddon authored and Aaron Raddon committed May 25, 2008
1 parent e078b22 commit c79d262
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions model.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ def __init__(self, parent=None, key_name=None, _app=None, **kwds):
DBModel.__init__(self, parent=None, key_name=None, _app=None, **kwds)

def __setattr__(self,attrname,value):
"""
DataStore api stores all prop values say "email" is stored in "_email" so
we intercept the set attribute, see if it has changed, then check for an
onchanged method for that property to call
"""
if (attrname.find('_') != 0):
if hasattr(self,'_' + attrname):
curval = getattr(self,'_' + attrname)
Expand Down

0 comments on commit c79d262

Please sign in to comment.