From 92c3e502494714884b7a051721c9b322027369a1 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 18 Dec 2010 03:33:35 -0500 Subject: resource -> asset --- docs/zcml/aclauthorizationpolicy.rst | 2 +- docs/zcml/asset.rst | 65 ++++++++++++++++++++++++++++++++++++ docs/zcml/handler.rst | 2 +- docs/zcml/resource.rst | 62 ---------------------------------- docs/zcml/route.rst | 2 +- docs/zcml/view.rst | 6 ++-- 6 files changed, 71 insertions(+), 68 deletions(-) create mode 100644 docs/zcml/asset.rst delete mode 100644 docs/zcml/resource.rst (limited to 'docs/zcml') 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/asset.rst b/docs/zcml/asset.rst new file mode 100644 index 000000000..af7a6db94 --- /dev/null +++ b/docs/zcml/asset.rst @@ -0,0 +1,65 @@ +.. _asset_directive: + +``asset`` +--------- + +The ``asset`` directive adds an asset override for a single +static file/directory asset. + +Attributes +~~~~~~~~~~ + +``to_override`` + A :term:`asset specification` specifying the asset to be + overridden. + +``override_with`` + A :term:`asset specification` specifying the asset which + is used as the override. + +Examples +~~~~~~~~ + +.. topic:: Overriding a Single Asset File + + .. code-block:: xml + :linenos: + + + +.. topic:: Overriding all Assets in a Package + + .. code-block:: xml + :linenos: + + + +.. topic:: Overriding all Assets in a Subdirectory of a Package + + .. code-block:: xml + :linenos: + + + +Alternatives +~~~~~~~~~~~~ + +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:`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/resource.rst b/docs/zcml/resource.rst deleted file mode 100644 index 3f7c58faa..000000000 --- a/docs/zcml/resource.rst +++ /dev/null @@ -1,62 +0,0 @@ -.. _resource_directive: - -``resource`` ------------- - -The ``resource`` directive adds a resource override for a single -resource. - -Attributes -~~~~~~~~~~ - -``to_override`` - A :term:`resource specification` specifying the resource to be - overridden. - -``override_with`` - A :term:`resource specification` specifying the resource which - is used as the override. - -Examples -~~~~~~~~ - -.. topic:: Overriding a Single Resource File - - .. code-block:: xml - :linenos: - - - -.. topic:: Overriding all Resources in a Package - - .. code-block:: xml - :linenos: - - - -.. topic:: Overriding all Resources in a Subdirectory of a Package - - .. code-block:: xml - :linenos: - - - -Alternatives -~~~~~~~~~~~~ - -The :meth:`pyramid.config.Configurator.override_resource` -method can be used instead of the ``resource`` ZCML directive. - -See Also -~~~~~~~~ - -See also :ref:`resource_zcml_directive`. 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: @@ -232,7 +232,7 @@ Examples :linenos: -- cgit v1.2.3