From 9af33504d9d621bc0f87752837a09f9110e454e5 Mon Sep 17 00:00:00 2001 From: Chris Rossi Date: Tue, 15 Jul 2014 10:52:14 -0400 Subject: Show an example. --- pyramid/interfaces.py | 9 +++++++++ 1 file changed, 9 insertions(+) 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): -- cgit v1.2.3