Add version trait to Widget base,

From widget Trello: version numbers for widget models;
when reloaded, will give the widget a chance to do
something intelligent or fail (by default) if the
version number doesn't match.
This commit is contained in:
Jonathan Frederic 2014-10-08 21:17:11 -07:00
parent 98cef15a7c
commit 1172876191

View File

@ -107,6 +107,7 @@ class Widget(LoggingConfigurable):
msg_throttle = Int(3, sync=True, help="""Maximum number of msgs the
front-end can send before receiving an idle msg from the back-end.""")
version = Int(0, sync=True, help="""Widget's version""")
keys = List()
def _keys_default(self):
return [name for name in self.traits(sync=True)]