summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2015-11-15 21:59:56 -0600
committerMichael Merickel <michael@merickel.org>2015-11-15 21:59:56 -0600
commit104870609e23edd1dba4d64869a068e883767552 (patch)
treef242c7bfe99c1cb8ef4f52bdd76d1364472ae619 /docs
parent1e1111ba774c4cb12b075338e921283047bd3600 (diff)
downloadpyramid-104870609e23edd1dba4d64869a068e883767552.tar.gz
pyramid-104870609e23edd1dba4d64869a068e883767552.tar.bz2
pyramid-104870609e23edd1dba4d64869a068e883767552.zip
update docs to use asset specs with ManifestCacheBuster
Diffstat (limited to 'docs')
-rw-r--r--docs/narr/assets.rst5
1 files changed, 1 insertions, 4 deletions
diff --git a/docs/narr/assets.rst b/docs/narr/assets.rst
index d36fa49c0..0f819570c 100644
--- a/docs/narr/assets.rst
+++ b/docs/narr/assets.rst
@@ -500,15 +500,12 @@ The following code would set up a cachebuster:
.. code-block:: python
:linenos:
- from pyramid.path import AssetResolver
from pyramid.static import ManifestCacheBuster
- resolver = AssetResolver()
- manifest = resolver.resolve('myapp:static/manifest.json')
config.add_static_view(
name='http://mycdn.example.com/',
path='mypackage:static',
- cachebust=ManifestCacheBuster(manifest.abspath()))
+ cachebust=ManifestCacheBuster('myapp:static/manifest.json'))
A simpler approach is to use the
:class:`~pyramid.static.QueryStringConstantCacheBuster` to generate a global