summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
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