diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-11-11 19:42:58 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-11-11 19:42:58 +0000 |
| commit | 06173dbf039e0fc87878f32c8937112c4cb8fe86 (patch) | |
| tree | 7d4fb52cd82953a7061fa491ff515159078b4461 | |
| parent | b0bf09cb6fd40e0b981c107f80516f29c86ffae3 (diff) | |
| download | pyramid-06173dbf039e0fc87878f32c8937112c4cb8fe86.tar.gz pyramid-06173dbf039e0fc87878f32c8937112c4cb8fe86.tar.bz2 pyramid-06173dbf039e0fc87878f32c8937112c4cb8fe86.zip | |
Another example, minor typo fix.
| -rw-r--r-- | repoze/bfg/url.py | 9 |
1 files changed, 8 insertions, 1 deletions
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 ``<static>`` 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. |
