summaryrefslogtreecommitdiff
path: root/docs/narr/assets.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2010-12-26 17:46:02 -0500
committerChris McDonough <chrism@plope.com>2010-12-26 17:46:02 -0500
commitcccde7d6fa003b621383286931540203b66f01f7 (patch)
tree52dea3ec68203c9bbaee8e5a6b2c0175f0d6d0b7 /docs/narr/assets.rst
parentb33ae924870d29f1c1a4c57fde694050a535aba2 (diff)
downloadpyramid-cccde7d6fa003b621383286931540203b66f01f7.tar.gz
pyramid-cccde7d6fa003b621383286931540203b66f01f7.tar.bz2
pyramid-cccde7d6fa003b621383286931540203b66f01f7.zip
explain relative asset spec
Diffstat (limited to 'docs/narr/assets.rst')
-rw-r--r--docs/narr/assets.rst11
1 files changed, 10 insertions, 1 deletions
diff --git a/docs/narr/assets.rst b/docs/narr/assets.rst
index 84fe42186..be3325a11 100644
--- a/docs/narr/assets.rst
+++ b/docs/narr/assets.rst
@@ -72,6 +72,15 @@ eventually passes this resolved absolute filesystem path to the Chameleon
templating engine, which then uses it to load, parse, and execute the
template file.
+There is a second form of asset specification: a *relative* asset
+specification. Instead of using an "absolute" asset specification which
+includes the package name, in certain circumstances you can omit the package
+name. For example, you might be able to use ``templates/mytemplate.pt``
+instead of ``myapp:templates/some_template.pt``. Such asset specifications
+are usually relative to a "current package." The "current package" is
+usually the package which contains the code that *uses* the asset
+specification.
+
.. index::
single: add_static_view
@@ -143,7 +152,7 @@ specification` as the ``path``:
config.add_static_view(name='static', path='some_package:a/b/c/static')
The ``path`` provided to :meth:`pyramid.config.Configurator.add_static_view`
-may be a fully qualified :term:`asset specification`, or an *absolute path*.
+may be a fully qualified :term:`asset specification` or an *absolute path*.
Instead of representing a URL prefix, the ``name`` argument of a call to
:meth:`pyramid.config.Configurator.add_static_view` can alternately be a