def model(thing): """ Decorator for flagging a class as a model. :param thing: A class or other callable that produces a model instance. """ return factory.set_marker(thing, '_produces_model')
def action(thing): """ Decorator for flagging a class as an action. :param thing: A class or other callable that produces an action instance. """ return factory.set_marker(thing, '_produces_action')