Example #1
0
    return 'another_grokked_post'

@bfg_view(name='another_stacked2')
@bfg_view(name='another_stacked1')
def stacked(context, request):
    return 'another_stacked'

class stacked_class(object):
    def __init__(self, context, request):
        self.context = context
        self.request = request

    def __call__(self):
        return 'another_stacked_class'

stacked_class = bfg_view(name='another_stacked_class1')(stacked_class)
stacked_class = bfg_view(name='another_stacked_class2')(stacked_class)

class oldstyle_grokked_class:
    def __init__(self, context, request):
        self.context = context
        self.request = request

    def __call__(self):
        return 'another_oldstyle_grokked_class'
    
oldstyle_grokked_class = bfg_view(name='another_oldstyle_grokked_class')(
    oldstyle_grokked_class)

class grokked_class(object):
    def __init__(self, context, request):
Example #2
0
    return 'grokked_post'

@bfg_view(name='stacked2')
@bfg_view(name='stacked1')
def stacked(context, request):
    return 'stacked'

class stacked_class(object):
    def __init__(self, context, request):
        self.context = context
        self.request = request

    def __call__(self):
        return 'stacked_class'

stacked_class = bfg_view(name='stacked_class1')(stacked_class)
stacked_class = bfg_view(name='stacked_class2')(stacked_class)
    
class oldstyle_grokked_class:
    def __init__(self, context, request):
        self.context = context
        self.request = request

    def __call__(self):
        return 'oldstyle_grokked_class'
    
oldstyle_grokked_class = bfg_view(name='oldstyle_grokked_class')(
    oldstyle_grokked_class)

class grokked_class(object):
    def __init__(self, context, request):