another thing i just realized: I use config.get_routes_mapper() (to pass information about routes to my javascript). With 1.2a1 this requires a config.commit() before the call, otherwise an empty mapping dict will be returned.
On Wed, Aug 24, 2011 at 10:13 AM, Chris McDonough <[email protected]> wrote: > On Wed, 2011-08-24 at 09:52 +0200, Robert Forkel wrote: >> just a quick feedback: i upgraded my app from 1.1.2 to 1.2a1 and now >> am getting ConfigurationConflictError s for the following statements: >> config.add_renderer(".mako", "pyramid.mako_templating.renderer_factory") >> config.add_renderer("json", "msp.renderers.json_renderer_factory") >> >> I didn't see anything seemingly relevant mentioned in the what's new doc. >> regards, >> robert > > Thanks for the report. > > If you add a "config.commit()" before you execute those add_renderer > statements, it will work again. > > I was trying to treat all default arguments to the Configurator as if > the equivalent action was done imperatively (e.g. passing > authentication_policy to the Configurator constructor is equivalent to > calling the new config.set_authentication_policy method). What's > happening is that the default renderers are getting registered as if you > called "add_renderer" with those too in the same configuration session. > It's as if you'd done: > > config.add_renderer('.mako', 'pyramid.mako_templating.renderer_factory') > config.add_renderer('json', 'pyramid.renderers.json_renderer_factory') > config.add_renderer('.mako', 'pyramid.mako_templating.renderer_factory') > config.add_renderer('json', 'msp.renderers.json_renderer_factory') > > And this will cause a conflict, because the same renderer factory name > is registered for two different renderer factories. > > This is not desirable. I will revert back to the old behavior of > autocommitting the default renderers in 1.2a2. The workaround of > committing before any other actions is forward compatible, so you can > just do that in the meantime. > > - C > > > -- > 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. > > -- 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.
