DD,

Thanks for the reply, and nice to see an example of Pylons routes
being able to rewrite. However, that doesn't solve the problem in the
general case, but in a file by file manner.

I think what I might end up doing is create a proxy server in Apache
that directs all the dynamic requests to Pylons, but serves the static
files itself. In this way I only have to change one filepath location
in the Apache configuration to make my development system and
production system work.

Thanks again,

Doug



On Jan 7, 6:03 pm, DD <[email protected]> wrote:
> You can rewrite the URL in routing.py:
>
> map.redirect('/plant/tool/verify/img/{fname}.png',
> '/tool/verify/img/{fname}.png')
>
> DD.
>
> On 1/7/2010 1:54 PM, writeson wrote:
>
> > Hi all,
>
> > I'm a pretty new user of Pylons and I've got a question about using
> > jQuery/jQueryUI with Pylons. When I'm developing on my local machine
> > and accessing static files in the public directory things work fine.
> > But when I post this to our production server there is a problem
> > accessing images that are embedded in jQuery and jQuery css files
> > (background-mage : url(/images/thing.png);). This is because my local
> > development path is something like this:
>
> > /tool/verify
>
> > where as in production:
>
> > /plant/tool/verify
>
> > This breaks the hard coded image paths that are in the jQuery UI css
> > files (and in some of my Javascript files that are trying to use
> > images). In my Python files I can use h.url_for() function to great
> > the correct relative mapping. But I can't call this function from
> > Javascript, and there is nothing that would do this kind of work
> > inside of css files. Is there a way to handle this so I don't have to
> > edit the paths inside css files for every installation?
>
> > Thanks in advance for your help!
> > Doug
-- 
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].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.


Reply via email to