-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
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)
...
Metadata
Metadata
Assignees
Labels
No labels