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 environment and have a long long long caching expiry. i guess the problem is that you need to support BOTH a placement at root and on a subdirectory. that means you can't rewrite all the routing so that it expects to be served in the subdir. While you could rewrite the routing so requests for the css files are handled by pylons instead of the static_files , I really don't like that idea due to caching concerns. 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 can be dozens of js/ css files. i think the easiest way to handle it would be to use rewrite or proxy rules to keep them on the top level. ie, your static files could be in /_sloecode_css instead of /sloecode/_css . under pylons you would have a folder _sloecode_css which would support dev and toplevel work. if anyone wants to run it in a subdirectory, they can just remap /_sloecode_css to serve out of /_sloecode/_css ie: Files: /sloecode/_sloecode_css Apache: RewriteRule ^_sloecode_css/(.*)$ /sloecode/_sloecode_css/$1 it would be trivial to do on nginx or anything else too. -- 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.
