From 06173dbf039e0fc87878f32c8937112c4cb8fe86 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 11 Nov 2009 19:42:58 +0000 Subject: Another example, minor typo fix. --- repoze/bfg/url.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/repoze/bfg/url.py b/repoze/bfg/url.py index 746713563..a39069642 100644 --- a/repoze/bfg/url.py +++ b/repoze/bfg/url.py @@ -226,6 +226,13 @@ def static_url(path, request, **kw): resource must live within a location defined via the ```` ZCML directive (see :ref:`static_resources_section`). + Example:: + + static_url('mypackage:static/foo.css', request) => + + http://example.com/static/foo.css + + The ``path`` argument points at a file or directory on disk which a URL should be generated for. The ``path`` may be either a relative path (e.g. ``static/foo.css``) or a :term:`resource @@ -236,7 +243,7 @@ def static_url(path, request, **kw): The ``request`` argument should be a WebOb request. The purpose of the ``**kw`` argument is the same as the purpose of - the ``route_url`` ``*kw`` argument. See the documentation for + the ``route_url`` ``**kw`` argument. See the documentation for that function to understand the arguments which you can provide to it. However, typically, you don't need to pass anything as ``*kw`` when generating a static resource URL. -- cgit v1.2.3