Permalink
Browse files

resource -> asset

  • Loading branch information...
1 parent c0c7b59 commit 3e2f12520381495aa64c24bdbe85d72b0746e16c @mcdonc mcdonc committed Dec 18, 2010
View
@@ -7,7 +7,7 @@
.. autofunction:: registerDummySecurityPolicy
- .. autofunction:: registerModels
+ .. autofunction:: registerResources
.. autofunction:: registerEventListener
@@ -31,7 +31,7 @@
.. autofunction:: cleanUp
- .. autoclass:: DummyModel
+ .. autoclass:: DummyResource
:members:
.. autoclass:: DummyRequest
View
@@ -38,20 +38,20 @@ Glossary
pkg_resources
A module which ships with :term:`setuptools` that provides an API
- for addressing "resource files" within Python packages. Resource
+ for addressing "asset files" within Python packages. Asset
files are static files, template files, etc; basically anything
non-Python-source that lives in a Python package can be considered
- a resource file. See also `PkgResources
+ a asset file. See also `PkgResources
<http://peak.telecommunity.com/DevCenter/PkgResources>`_
- resource
+ asset
Any file contained within a Python :term:`package` which is *not*
a Python source code file.
- resource specification
+ asset specification
A colon-delimited identifier for a :term:`resource`. The colon
separates a Python :term:`package` name from a package subpath.
- For example, the resource specification
+ For example, the asset specification
``my.package:static/baz.css`` identifies the file named
``baz.css`` in the ``static`` subdirectory of the ``my.package``
Python :term:`package`.
@@ -120,7 +120,7 @@ Glossary
string (which implies the :term:`default view`).
Default view
- The default view of a model is the view invoked when the
+ The default view of a resource is the view invoked when the
:term:`view name` is the empty string (``''``). This is the case
when :term:`traversal` exhausts the path elements in the PATH_INFO
of a request before it returns a :term:`context`.
@@ -131,25 +131,24 @@ Glossary
Python. `virtualenv <http://pypi.python.org/pypi/virtualenv>`_
was created by Ian Bicking.
- model
- An object representing data in the system. If :mod:`traversal` is
- used, a model is a node in the object graph traversed by the
- system. When traversal is used, a model instance becomes the
- :term:`context` of a :term:`view`. If :mod:`url dispatch` is
- used, a single :term:`context` is generated for each request and
- is used as the context of a view: this object is also technically
- a "model" in :app:`Pyramid` terms, although this terminology
- can be a bit confusing: see :ref:`model_traversal_confusion`.
+ resource
+ An object representing a node in the resource tree of an application.
+ If :mod:`traversal` is used, a resource is an element in the resource
+ tree traversed by the system. When traversal is used, a resource
+ becomes the :term:`context` of a :term:`view`. If :mod:`url dispatch`
+ is used, a single resource is generated for each request and is
+ used as the context of a view.
traversal
- The act of descending "down" a graph of model objects from a root
- model in order to find a :term:`context`. The :app:`Pyramid`
- :term:`router` performs traversal of model objects when a
- :term:`root factory` is specified. See the
- :ref:`traversal_chapter` chapter for more information. Traversal
- can be performed *instead* of :term:`URL dispatch` or can be
- combined *with* URL dispatch. See :ref:`hybrid_chapter` for more
- information about combining traversal and URL dispatch (advanced).
+
+ The act of descending "up" a tree of resource objects from a root
+ resource in order to find a :term:`context`. The :app:`Pyramid`
+ :term:`router` performs traversal of resource objects when a :term:`root
+ factory` is specified. See the :ref:`traversal_chapter` chapter for
+ more information. Traversal can be performed *instead* of :term:`URL
+ dispatch` or can be combined *with* URL dispatch. See
+ :ref:`hybrid_chapter` for more information about combining traversal and
+ URL dispatch (advanced).
router
The :term:`WSGI` application created when you start a
@@ -159,27 +158,27 @@ Glossary
:app:`Pyramid` application.
URL dispatch
- An alternative to graph traversal as a mechanism for locating a
+ An alternative to :term:`traversal` as a mechanism for locating a
:term:`context` for a :term:`view`. When you use a :term:`route`
in your :app:`Pyramid` application via a :term:`route
configuration`, you are using URL dispatch. See the
:ref:`urldispatch_chapter` for more information.
context
An object in the system that is found during :term:`traversal` or
- :term:`URL dispatch` based on URL data; if it's found via
- traversal, it's usually a :term:`model` object that is part of an
- object graph; if it's found via :term:`URL dispatch`, it's a
- object manufactured on behalf of the route's "factory". A context
- becomes the subject of a :term:`view`, and typically has security
- information attached to it. See the :ref:`traversal_chapter`
- chapter and the :ref:`urldispatch_chapter` chapter for more
- information about how a URL is resolved to a context.
+ :term:`URL dispatch` based on URL data; if it's found via traversal,
+ it's usually a :term:`resource` object that is part of a resource tree;
+ if it's found via :term:`URL dispatch`, it's a object manufactured on
+ behalf of the route's "factory". A context becomes the subject of a
+ :term:`view`, and typically has security information attached to it.
+ See the :ref:`traversal_chapter` chapter and the
+ :ref:`urldispatch_chapter` chapter for more information about how a URL
+ is resolved to a context.
application registry
A registry of configuration information consulted by
:app:`Pyramid` while servicing an application. An application
- registry maps model types to views, as well as housing other
+ registry maps resource types to views, as well as housing other
application-specific component registrations. Every
:app:`Pyramid` application has one (and only one) application
registry.
@@ -189,20 +188,19 @@ Glossary
text, XML, or HTML when rendered.
location
- The path to an object in an object graph. See :ref:`location_aware`
- for more information about how to make a model object *location-aware*.
+ The path to an object in a resource tree. See :ref:`location_aware` for
+ more information about how to make a resource object *location-aware*.
permission
- A string or unicode object that represents an action being taken
- against a context. A permission is associated with a view name
- and a model type by the developer. Models are decorated with
- security declarations (e.g. an :term:`ACL`), which reference these
- tokens also. Permissions are used by the active to security
- policy to match the view permission against the model's statements
- about which permissions are granted to which principal in a
- context in order to to answer the question "is this user allowed
- to do this". Examples of permissions: ``read``, or
- ``view_blog_entries``.
+ A string or unicode object that represents an action being taken against
+ a context. A permission is associated with a view name and a resource
+ type by the developer. Resources are decorated with security
+ declarations (e.g. an :term:`ACL`), which reference these tokens also.
+ Permissions are used by the active to security policy to match the view
+ permission against the resources's statements about which permissions
+ are granted to which principal in a context in order to to answer the
+ question "is this user allowed to do this". Examples of permissions:
+ ``read``, or ``view_blog_entries``.
default permission
A :term:`permission` which is registered as the default for an
@@ -225,9 +223,9 @@ Glossary
ACL
An *access control list*. An ACL is a sequence of :term:`ACE`
- tuples. An ACL is attached to a model instance. An example of an
+ tuples. An ACL is attached to a resource instance. An example of an
ACL is ``[ (Allow, 'bob', 'read'), (Deny, 'fred', 'write')]``. If
- an ACL is attached to a model instance, and that model instance is
+ an ACL is attached to a resource instance, and that resource is
findable via the context, it will be consulted any active security
policy to determine wither a particular request can be fulfilled
given the :term:`authentication` information in the request.
@@ -416,7 +414,7 @@ Glossary
interface
A `Zope interface <http://pypi.python.org/pypi/zope.interface>`_
object. In :app:`Pyramid`, an interface may be attached to a
- :term:`model` object or a :term:`request` object in order to
+ :term:`resource` object or a :term:`request` object in order to
identify that the object is "of a type". Interfaces are used
internally by :app:`Pyramid` to perform view lookups and other
policy lookups. The ability to make use of an interface is
@@ -476,7 +474,7 @@ Glossary
:app:`Pyramid` to form a workflow system.
virtual root
- A model object representing the "virtual" root of a request; this
+ A resource object representing the "virtual" root of a request; this
is typically the physical root object (the object returned by the
application root factory) unless :ref:`vhosting_chapter` is in
use.
View
@@ -119,6 +119,7 @@ ZCML Directive Reference
zcml/aclauthorizationpolicy
zcml/adapter
zcml/authtktauthenticationpolicy
+ zcml/asset
zcml/configure
zcml/default_permission
zcml/forbidden
@@ -127,7 +128,6 @@ ZCML Directive Reference
zcml/remoteuserauthenticationpolicy
zcml/renderer
zcml/repozewho1authenticationpolicy
- zcml/resource
zcml/route
zcml/scan
zcml/static
View
@@ -13,6 +13,7 @@ documentation is organized alphabetically by directive name.
zcml/aclauthorizationpolicy
zcml/adapter
zcml/authtktauthenticationpolicy
+ zcml/asset
zcml/configure
zcml/default_permission
zcml/forbidden
@@ -23,7 +24,6 @@ documentation is organized alphabetically by directive name.
zcml/remoteuserauthenticationpolicy
zcml/renderer
zcml/repozewho1authenticationpolicy
- zcml/resource
zcml/route
zcml/scan
zcml/static
View
@@ -65,7 +65,7 @@ def permits(self, context, principals, permission):
permits access, return an instance of
:class:`pyramid.security.ACLDenied` if not."""
- acl = '<No ACL found on any object in model lineage>'
+ acl = '<No ACL found on any object in resource lineage>'
for location in lineage(context):
try:
@@ -71,7 +71,7 @@ def get_renderer(path):
""" Return a callable object which can be used to render a
:term:`Chameleon` text template using the template implied by the
``path`` argument. The ``path`` argument may be a
- package-relative path, an absolute path, or a :term:`resource
+ package-relative path, an absolute path, or a :term:`asset
specification`.
.. warning:: This API is deprecated in :app:`Pyramid` 1.0. Use
@@ -90,7 +90,7 @@ def get_template(path):
""" Return the underyling object representing a :term:`Chameleon`
text template using the template implied by the ``path`` argument.
The ``path`` argument may be a package-relative path, an absolute
- path, or a :term:`resource specification`.
+ path, or a :term:`asset specification`.
.. warning:: This API is deprecated in :app:`Pyramid` 1.0. Use
the ``implementation()`` method of a template renderer retrieved via
@@ -109,7 +109,7 @@ def get_template(path):
def render_template(path, **kw):
""" Render a :term:`Chameleon` text template using the template
implied by the ``path`` argument. The ``path`` argument may be a
- package-relative path, an absolute path, or a :term:`resource
+ package-relative path, an absolute path, or a :term:`asset
specification`. The arguments in ``*kw`` are passed as top-level
names to the template, and so may be used within the template
itself. Returns a string.
@@ -130,7 +130,7 @@ def render_template(path, **kw):
def render_template_to_response(path, **kw):
""" Render a :term:`Chameleon` text template using the template
implied by the ``path`` argument. The ``path`` argument may be a
- package-relative path, an absolute path, or a :term:`resource
+ package-relative path, an absolute path, or a :term:`asset
specification`. The arguments in ``*kw`` are passed as top-level
names to the template, and so may be used within the template
itself. Returns a :term:`Response` object with the body as the
View
@@ -56,7 +56,7 @@ def get_renderer(path):
""" Return a callable object which can be used to render a
:term:`Chameleon` ZPT template using the template implied by the
``path`` argument. The ``path`` argument may be a
- package-relative path, an absolute path, or a :term:`resource
+ package-relative path, an absolute path, or a :term:`asset
specification`.
.. warning:: This API is deprecated in :app:`Pyramid` 1.0. Use
@@ -75,7 +75,7 @@ def get_template(path):
""" Return the underyling object representing a :term:`Chameleon`
ZPT template using the template implied by the ``path`` argument.
The ``path`` argument may be a package-relative path, an absolute
- path, or a :term:`resource specification`.
+ path, or a :term:`asset specification`.
.. warning:: This API is deprecated in :app:`Pyramid` 1.0. Use
the ``implementation()`` method of a template renderer retrieved via
@@ -94,7 +94,7 @@ def get_template(path):
def render_template(path, **kw):
""" Render a :term:`Chameleon` ZPT template using the template
implied by the ``path`` argument. The ``path`` argument may be a
- package-relative path, an absolute path, or a :term:`resource
+ package-relative path, an absolute path, or a :term:`asset
specification`. The arguments in ``*kw`` are passed as top-level
names to the template, and so may be used within the template
itself. Returns a string.
@@ -115,7 +115,7 @@ def render_template(path, **kw):
def render_template_to_response(path, **kw):
""" Render a :term:`Chameleon` ZPT template using the template
implied by the ``path`` argument. The ``path`` argument may be a
- package-relative path, an absolute path, or a :term:`resource
+ package-relative path, an absolute path, or a :term:`asset
specification`. The arguments in ``*kw`` are passed as top-level
names to the template, and so may be used within the template
itself. Returns a :term:`Response` object with the body as the
Oops, something went wrong.

0 comments on commit 3e2f125

Please sign in to comment.