I had some issues with this in Pyramid 1.1 and also found it to be 
counter-intuitive (see 
here<https://groups.google.com/forum/#%21topic/pylons-discuss/-RjHhmI-O3c/discussion>),
 
but my thinking was opposite yours with regard to how asset overrides 
should be applied to `mako.directories`.

In Pyramid 1.1, the problem was that the asset spec was resolved lazily the 
first time a template was rendered, which meant that my asset override was 
applied to the `mako.directories` setting even though I didn't want it to 
be. In my mind, `mako.directories` should have already been fully resolved 
by the time I called `config.override_asset()`.

I fixed this by resolving the asset specs myself at configuration time 
(i.e., in my `main` function) before the `override_asset()` call.

If it now works the way you describe, I might consider it to be fixed.

I guess the big question is, should asset overrides be applied to settings 
and, if so, at what point during the configuration process? Because you 
might want to do some base configuration without any overrides applied and 
then say, ok, from here on out apply this override.

-- 
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/-/_Qu7olu1E_4J.
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.

Reply via email to