コード例 #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')
コード例 #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')
コード例 #3
0
ファイル: model.py プロジェクト: riverbed/steelscript
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')
コード例 #4
0
ファイル: action.py プロジェクト: grelleum/steelscript
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')