I think what you are looking for his view_defaults: http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/narr/viewconfig.html http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/api/view.html#pyramid.view.view_defaults
On Tue, Aug 28, 2012 at 4:07 PM, Jason <[email protected]> wrote: > 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. -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. 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.
