Thank you Robert for your fast reply. This looks like it will help be to implement my requirements :)
On Monday, January 28, 2013 1:20:00 PM UTC+1, Robert Forkel wrote: > > You may want to look at > > http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/assets.html#overriding-assets > > regards > robert > > On Mon, Jan 28, 2013 at 1:17 PM, Torsten Irländer > <[email protected]<javascript:>> > wrote: > > Hi, > > > > I am currently migrating my Pylons application to Pyramid and I have > some > > questions on how to realize things in the pyramid way. > > > > In my old applications I often used a kind of base library which > provides > > default templates and basic static files which can be overwritten by the > > application. > > For templates (mako) I already found the solution by defining multiple > > locations for templates using the mako.directory variable in the ini > file. > > > > What I am searching for is a way how to best implement something like > the > > this: > > > > Example: > > > > baselib/static/images/a.jpg > > baselib/static/css/main.css > > > > application/static/images/a.jpg > > > > In the above example i want to be able to request the static file by > using > > static_url function: > > > > > > 1. request.static_url('application:images/a.png') > > 2. request.static_url('application:css/main.css') > > > > Call 1 should return the file from the application as the application > > "overwrites" the default file in the base > > Call 2 should return the file from the baselib as the application does > not > > provide the file. > > > > Is this possible? Are there any pointer which might be a good solution > for > > this? > > In Pylons 1.0 I can achieve this by defining multiple location where the > > application looks for template files. > > Something like the mako.directories variable for templates in pyrmaid > > > > Greetings > > Torsten > > > > > > > > -- > > 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]<javascript:>. > > > To unsubscribe from this group, send email to > > [email protected] <javascript:>. > > Visit this group at http://groups.google.com/group/pylons-discuss?hl=en. > > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > -- 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]. Visit this group at http://groups.google.com/group/pylons-discuss?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
