> Iain Duncan wrote:
> > Hi bfg folks, one feature I miss from pylons is having elements from the
> > route parsing be automatically passed to controller methods as named
> args. I
> > expect this got some thought and was decided against, I'm curious why? It
> > seems to me it would be nice if this route:
> > <route
> > path="/foo/bar/:baz"
> > name="foo"
> > view=".views.foo_view"
> > view_attr="bar"
> > />
> > would automatically pass baz in, bypassing the need to look in
> > reques.matchdict if foo_view had a method like:
> > def bar(self, baz):
> > Thoughts?
> I doubt we will add that as the default behavior -- we are hoping to
> keep the calling convention completely uniform by default. However, it
> should be trivial to write a decorator which you can use to adapt the two.
Hmm, what about adding another optional param to route tags? something like
use_global_views, but as a flag for the passing in named args
automatically? I would think a lot of people coming to bfg from other
frameworks and using it as a micro-framework would really like that. Or am I
the only one? ;-)
Repoze-dev mailing list