I want to map a route to a class-based view without needing to name the 
class again in a view-config decorator and without needing to explicitly 
name it in a config.add_view in the __init__. 

I want 

config.add_route('MyClass', '/')

to map that route to 

@view_defaults(renderer='string')
class MyClass(object):
    def __init__(self, request):
        self.request = request

    def __call__(self):
        return 'a string'

without needing any extra code. Is this possible?

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/pylons-discuss/-/LSh9cGEFUJkJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to