Re: How to change paths to static assets in .css files?

2012-01-07 Thread Wyatt Baldwin
On Saturday, January 7, 2012 8:28:46 AM UTC-8, Craig Younkins wrote: For our site we actually have a build process for our CSS templates at application start. This way we can have different domains depending on the configuration (testing, prod, dev), and it all works with the same

Re: How to change paths to static assets in .css files?

2012-01-07 Thread Craig Younkins
@Wyatt: The step may not be necessary for everyone. For us, we wanted the flexibility. We will be moving to a real template compiler like SASS in the very near future. No, I cannot share my code. To each his own. Craig Younkins On Sat, Jan 7, 2012 at 1:14 PM, Wyatt Baldwin

Re: How to change paths to static assets in .css files?

2012-01-06 Thread Mattias
There are two things you can do without making your css files into templates. 1. Always use relative paths in the css. div.background { background: url(../img/background.png) } Thats how I did it in the beginning. Unfortunately our css files keeps moving around, during development they are

Re: How to change paths to static assets in .css files?

2012-01-06 Thread Jonathan Vanasco
I've preferred the relative and @base solutions before without much issue. i'm assuming you're talking about https://launchpad.net/sloecode/trunk I would really focus on keeping the css out of the templating system. your css/img/js files really should never touch a dynamic server in a production

Re: How to change paths to static assets in .css files?

2012-01-06 Thread Thomi Richards
Hi, On 7 January 2012 09:21, Jonathan Vanasco jonat...@findmeon.com wrote: looking at how you implemented http://bazaar.launchpad.net/~sloecode/sloecode/trunk/revision/141 , i would really suggest that you add a memory cache function to this. rendering doesn't take much work, but there

Re: How to change paths to static assets in .css files?

2012-01-06 Thread Jonathan Vanasco
make sure to bench in terms of concurrency and try to send a long term cache control header. the problem i experienced years ago under similar setups (mod_perl and mod_python) was this: the render/etc times were really nothing or the items were served 'raw' by the app -- but all the js / css /

How to change paths to static assets in .css files?

2012-01-05 Thread Thomi Richards
Hi, I'm working on a pylons project, and we have users trying to host the web-app under a non-root path (i.e. host it at '/myapp/' rather than at '/'). We've been pretty good about using 'h.url_for' to generate links in our jinja2 templates, so most things work as expected. However, our CSS file

Re: How to change paths to static assets in .css files?

2012-01-05 Thread Mike Orr
On Thu, Jan 5, 2012 at 1:24 PM, Thomi Richards tho...@gmail.com wrote: Hi, I'm working on a pylons project, and we have users trying to host the web-app under a non-root path (i.e. host it at '/myapp/' rather than at '/'). We've been pretty good about using 'h.url_for' to generate links in

Re: How to change paths to static assets in .css files?

2012-01-05 Thread Wyatt Baldwin
On Thursday, January 5, 2012 1:24:21 PM UTC-8, Thomi wrote: Hi, I'm working on a pylons project, and we have users trying to host the web-app under a non-root path (i.e. host it at '/myapp/' rather than at '/'). We've been pretty good about using 'h.url_for' to generate links in our

Re: How to change paths to static assets in .css files?

2012-01-05 Thread Petr Blahos
I'm working on a pylons project, and we have users trying to host the web-app under a non-root path (i.e. host it at '/myapp/' rather than at '/'). We've been pretty good about using 'h.url_for' to generate links in our jinja2 templates, so most things work as expected. However, our CSS file