Hello,

I'm trying to move on from pyramid_handlers to using config.add_route and 
view_config for increased configuration options (and I think it will be 
better organized), but there is one throwback I want to keep. Almost all of 
my view-callables will need the view_config option "matchparam={'action': 
<function_name>}" where function_name is the name of the view-callable def. 
What would be the best way to achieve this?

I think I could subclass view_config and override the __call__ method to 
add it as a parameter as seen below, but is this advisable?

class action_config(view_config):
    def __call__(self, wrapped):
        self.matchparam = {'action': wrapped.__name__}
        return view_config.__call__(self, wrapped)


Thanks for feedback,

Jason

-- 
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/-/jhpE8lLT7A8J.
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