summaryrefslogtreecommitdiff
path: root/docs/zcml
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2010-12-18 03:33:35 -0500
committerChris McDonough <chrism@plope.com>2010-12-18 03:33:35 -0500
commit92c3e502494714884b7a051721c9b322027369a1 (patch)
tree3cd5a871ff5b13cf48be0fec45b9f13c8d451341 /docs/zcml
parent515d0f977f21bf28602505b859f64f10dd2f5f59 (diff)
downloadpyramid-92c3e502494714884b7a051721c9b322027369a1.tar.gz
pyramid-92c3e502494714884b7a051721c9b322027369a1.tar.bz2
pyramid-92c3e502494714884b7a051721c9b322027369a1.zip
resource -> asset
Diffstat (limited to 'docs/zcml')
-rw-r--r--docs/zcml/aclauthorizationpolicy.rst2
-rw-r--r--docs/zcml/asset.rst (renamed from docs/zcml/resource.rst)33
-rw-r--r--docs/zcml/handler.rst2
-rw-r--r--docs/zcml/route.rst2
-rw-r--r--docs/zcml/view.rst6
5 files changed, 24 insertions, 21 deletions
diff --git a/docs/zcml/aclauthorizationpolicy.rst b/docs/zcml/aclauthorizationpolicy.rst
index 2c66da0c8..f09531415 100644
--- a/docs/zcml/aclauthorizationpolicy.rst
+++ b/docs/zcml/aclauthorizationpolicy.rst
@@ -4,7 +4,7 @@
--------------------------
When this directive is used, authorization information is obtained
-from :term:`ACL` objects attached to model instances.
+from :term:`ACL` objects attached to :term:`resource` objects.
Attributes
~~~~~~~~~~
diff --git a/docs/zcml/resource.rst b/docs/zcml/asset.rst
index 3f7c58faa..af7a6db94 100644
--- a/docs/zcml/resource.rst
+++ b/docs/zcml/asset.rst
@@ -1,51 +1,51 @@
-.. _resource_directive:
+.. _asset_directive:
-``resource``
-------------
+``asset``
+---------
-The ``resource`` directive adds a resource override for a single
-resource.
+The ``asset`` directive adds an asset override for a single
+static file/directory asset.
Attributes
~~~~~~~~~~
``to_override``
- A :term:`resource specification` specifying the resource to be
+ A :term:`asset specification` specifying the asset to be
overridden.
``override_with``
- A :term:`resource specification` specifying the resource which
+ A :term:`asset specification` specifying the asset which
is used as the override.
Examples
~~~~~~~~
-.. topic:: Overriding a Single Resource File
+.. topic:: Overriding a Single Asset File
.. code-block:: xml
:linenos:
- <resource
+ <asset
to_override="some.package:templates/mytemplate.pt"
override_with="another.package:othertemplates/anothertemplate.pt"
/>
-.. topic:: Overriding all Resources in a Package
+.. topic:: Overriding all Assets in a Package
.. code-block:: xml
:linenos:
- <resource
+ <asset
to_override="some.package"
override_with="another.package"
/>
-.. topic:: Overriding all Resources in a Subdirectory of a Package
+.. topic:: Overriding all Assets in a Subdirectory of a Package
.. code-block:: xml
:linenos:
- <resource
+ <asset
to_override="some.package:templates/"
override_with="another.package:othertemplates/"
/>
@@ -53,10 +53,13 @@ Examples
Alternatives
~~~~~~~~~~~~
-The :meth:`pyramid.config.Configurator.override_resource`
+The :meth:`pyramid.config.Configurator.override_asset`
method can be used instead of the ``resource`` ZCML directive.
+This directive can also be invoked as the ``resource`` ZCML directive for
+backwards compatibility purposes.
+
See Also
~~~~~~~~
-See also :ref:`resource_zcml_directive`.
+See also :ref:`asset_zcml_directive`.
diff --git a/docs/zcml/handler.rst b/docs/zcml/handler.rst
index 301bf7895..01d442ab6 100644
--- a/docs/zcml/handler.rst
+++ b/docs/zcml/handler.rst
@@ -28,7 +28,7 @@ Attributes
``factory``
The :term:`dotted Python name` to a function that will generate a
:app:`Pyramid` context object when the associated route matches.
- e.g. ``mypackage.models.MyFactoryClass``. If this argument is not
+ e.g. ``mypackage.resources.MyResource``. If this argument is not
specified, a default root factory will be used.
``xhr``
diff --git a/docs/zcml/route.rst b/docs/zcml/route.rst
index 4f7cdb955..ac9261e27 100644
--- a/docs/zcml/route.rst
+++ b/docs/zcml/route.rst
@@ -25,7 +25,7 @@ Attributes
``factory``
The :term:`dotted Python name` to a function that will generate a
:app:`Pyramid` context object when this route matches.
- e.g. ``mypackage.models.MyFactoryClass``. If this argument is not
+ e.g. ``mypackage.resources.MyResource``. If this argument is not
specified, a default root factory will be used.
``view``
diff --git a/docs/zcml/view.rst b/docs/zcml/view.rst
index 74d497cb3..6887f88fb 100644
--- a/docs/zcml/view.rst
+++ b/docs/zcml/view.rst
@@ -157,7 +157,7 @@ Predicate Attributes
representing the class that a graph traversal parent object of the
:term:`context` must be an instance of (or :term:`interface` that a
parent object must provide) in order for this view to be found and
- called. Your models must be "location-aware" to use this feature.
+ called. Your resources must be "location-aware" to use this feature.
See :ref:`location_aware` for more information about
location-awareness.
@@ -222,7 +222,7 @@ Examples
:linenos:
<view
- context=".models.MyModel"
+ context=".resources.MyResource"
view=".views.hello_world"
/>
@@ -232,7 +232,7 @@ Examples
:linenos:
<view
- context=".models.MyModel"
+ context=".resources.MyResource"
view=".views.hello_world_post"
request_method="POST"
/>