Created
August 18, 2012 08:15
-
-
Save hamiltop/3385216 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# my goal is for one module (of many) to use https://webcache.foo.com/ in place of /common/ for a set of static assets. | |
#here's what I have: | |
# root __init__.py | |
config.add_static_view('common', 'foo_web.layout:static/', cache_max_age=3600) | |
# my module __init__.py | |
config.add_static_view('https://webcache.foo.com/', 'foo_web.layout:cloudfront/', cache_max_age=3600) | |
config.override_asset( | |
override_with='foo_web.layout:cloudfront/', | |
to_override='foo_web.layout:static/', | |
) | |
# this doesn't do what I want though. | |
# if I change the line in root __init__.py to | |
config.add_static_view('https://webcache.foo.com/', 'foo_web.layout:static/', cache_max_age=3600) | |
# then all the links work properly, but it makes all modules use the new url which is not what I want. What am I doing wrong? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment