You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wondering how can I mix different classes in a DictProperty. For example, in the example below I have 2 different classes that I would like to map to 'actions' DictProperty attribute.
Couldn't find any knob in the tests or documentation. Appreciate any comments about it.
# generic class
class Action(orm.JsonObject):
pass
# action class 1
class EmailAction(Action):
action = 'email'
subject = orm.StringProperty()
...
# action class 2
class PagerAction(Action):
action = 'pager'
queues = orm.ListProperty(orm.StringProperty)
...
# using DictProperty to get it together
class Alert(orm.JsonObject):
actions = orm.DictProperty(Action)
...
The text was updated successfully, but these errors were encountered:
Wondering how can I mix different classes in a DictProperty. For example, in the example below I have 2 different classes that I would like to map to 'actions' DictProperty attribute.
Couldn't find any knob in the tests or documentation. Appreciate any comments about it.
The text was updated successfully, but these errors were encountered: