Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion How to change paths to static assets in .css files?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Thomi Richards  
View profile  
 More options Jan 5 2012, 4:24 pm
From: Thomi Richards <tho...@gmail.com>
Date: Fri, 6 Jan 2012 10:24:21 +1300
Local: Thurs, Jan 5 2012 4:24 pm
Subject: How to change paths to static assets in .css files?

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 has paths to icons, background images etc. Since these are served as
static files these paths never get modified.

I'm sure this is a problem lots of people come across - can anyone suggest
a solution? I can think of two possibilities:

1) Remove all paths from the css files, and put them in the jinja2
templates instead - this seems really ugly, and I'd rather not do this.
2) Somehow serve the css file as a jinja2 template. It'd be nice if there
was some way to say ' all requests for a .css file should render the
requested file with jinja2 and return the result.'

Any ideas?

Cheers,

--
Thomi Richards


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.