Exemplo n.º 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')
Exemplo n.º 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')
Exemplo n.º 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')
Exemplo n.º 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')