> The asset resolution depends on the current threadlocal registry, which is > only available between config.begin() and config.end(), or while processing > a request. At the point you're trying to invoke resolve(), there is no > registry on the threadlocal stack and thus when resolving assets, the > resolver is unable to find your overrides.
Putting config.begin() and config.end() around resolve() works. Thanks! András > > Hi, > > > > Using pyramid 1.5b1 I found that assets are not overridden in my > > application package's __init__.py: > > > > def main(global_config, **settings): > > config = Configurator(...) > > config.override_asset(...) > > app = config.make_wsgi_app() > > asset = AssetResolver.resolve(...) # gives the original asset > > return app > > > > But AssetResolver.resolve(...) called later while processing a request > > gives the overridden one. > > > > What should I do to get the overridden assets in the package's __init__ > > too? > > > > András -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
