Example #1
0
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')
Example #2
0
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')
Example #3
0
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')
Example #4
0
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')