On 2/14/07, Shannon -jj Behrens <[EMAIL PROTECTED]> wrote:
>
> On 2/14/07, Ben Bangert <[EMAIL PROTECTED]> wrote:
> > On Feb 14, 2007, at 2:02 PM, Bob Ippolito wrote:
> >
> > > This just seems like a bad API decision. The namespace should really
> > > be a dict argument rather than trying to mince it together with the
> > > other arguments that do entirely different things. The current API is
> > > just really unnatural.
> > >
> > > In all of my controllers the namespace is already a separate dict, but
> > > I have to **args it in (and hope that I don't use some name that the
> > > render function cares about).
> >
> > Agreed, I'd like to change it to take a dict that goes to the
> > namespace of the template though that'll probably break a few
> > people's projects. Most people are using the 'c' object to pass
> > variables so they won't be affected. I'll take a look at making it
> > able to take a dict as the first arg which it'd then use as the
> > namespace, and throw a deprecation warning for 0.9.5 should a full
> > set of keyword args be passed indicating that it should be switched
> > to a dict.
> >
> > Ie:
> > render_response('/some/template',dict(arg='val'), format='xml')
> >
> > Or if you want to do it all with keyword args:
> > render_response('/some/template', namespace=dict(arg='val'),
> > format='xml')
> >
> > As none of the Response init args conflict with the Buffet render
> > args, I don't see any harm in letting you put keyword options like
> > mimetype in there that go to the Response object created. How's that
> > look?
>
> +0.5
>
> Anyway, the docs tell you to use c.They do, but my templates are all ported over from TurboGears, which uses a flat namespace. I'm not using c at all. -bob --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
