diff options
| author | Chris Rossi <chris@archimedeanco.com> | 2014-07-15 10:52:14 -0400 |
|---|---|---|
| committer | Chris Rossi <chris@archimedeanco.com> | 2014-07-15 10:52:14 -0400 |
| commit | 9af33504d9d621bc0f87752837a09f9110e454e5 (patch) | |
| tree | b538b2ec431503e99d61ee3673c72ebffd26222e | |
| parent | 9d521efce433af574382c86a7397f1ac53a73804 (diff) | |
| download | pyramid-9af33504d9d621bc0f87752837a09f9110e454e5.tar.gz pyramid-9af33504d9d621bc0f87752837a09f9110e454e5.tar.bz2 pyramid-9af33504d9d621bc0f87752837a09f9110e454e5.zip | |
Show an example.
| -rw-r--r-- | pyramid/interfaces.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pyramid/interfaces.py b/pyramid/interfaces.py index 84a6ad833..95aa1d60e 100644 --- a/pyramid/interfaces.py +++ b/pyramid/interfaces.py @@ -1202,6 +1202,15 @@ class ICachebustURLPregenerator(Interface): generation. The return value of this function should be two-tuple of ``(subpath, kw)`` which are versions of the same arguments modified to include the cachebust token in the generated URL. + + Here is an example which places the token in a query string: + + .. code-block:: python + :linenos: + + def cb_pregen(token, subpath kw): + kw.setdefault('_query', {})['cb'] = token + return subpath, kw """ class ICachebustURLMatcher(Interface): |
