> there are many css resource in my application.i place these resource(a
> correct url generated by url_for) in a dict,
> for optimizing sake, i want merge these css into a single file than
> cache it.so i need use urllib2.openurl function to get its content.
> but urllib2.openurl need a absolute url,i give it by urlparse.urljoin
> (request.application_url,a_css_url).

If these files are part of your package (in public/) you can open them
as files rather than using urllib. The value of config['pylons.paths']
['static_files'] will be the directory path (with "from pylons import
config" at the top) and you can add the filenames from there.

If they're hosted externally, maybe you need a line in your config
file for the hostname/root url to them.

--~--~---------~--~----~------------~-------~--~----~
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