From 197f0cb39d0a865476405dda21ad0d3e20ee0789 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 29 Oct 2010 13:23:31 -0400 Subject: bfg_view -> view_config --- docs/glossary.rst | 146 +++++++++++++++++++++++++++--------------------------- 1 file changed, 74 insertions(+), 72 deletions(-) (limited to 'docs/glossary.rst') diff --git a/docs/glossary.rst b/docs/glossary.rst index 93d86b664..9259fed0a 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -97,20 +97,20 @@ Glossary which will be an instance of a :term:`request` object. An alternate calling convention allows a view to be defined as a callable which accepts a pair of arguments: ``context`` and - ``request``: this calling convention is useful for traversal-based - applications in which a :term:`context` is always very important. A - view callable is the primary mechanism by which a developer writes - user interface code within :mod:`repoze.bfg`. See - :ref:`views_chapter` for more information about :mod:`repoze.bfg` - view callables. + ``request``: this calling convention is useful for + traversal-based applications in which a :term:`context` is always + very important. A view callable is the primary mechanism by + which a developer writes user interface code within + :mod:`pyramid`. See :ref:`views_chapter` for more information + about :mod:`pyramid` view callables. view configuration View configuration is the act of associating a :term:`view callable` with configuration information. This configuration information helps map a given :term:`request` to a particular view callable and it can influence the response of a view callable. - :mod:`repoze.bfg` views can be configured via :term:`imperative - configuration`, :term:`ZCML` or by a special ``@bfg_view`` + :mod:`pyramid` views can be configured via :term:`imperative + configuration`, :term:`ZCML` or by a special ``@view_config`` decorator coupled with a :term:`scan`. See :ref:`views_chapter` for more information about view configuration. @@ -138,12 +138,12 @@ Glossary :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 :mod:`repoze.bfg` terms, although this terminology + a "model" in :mod:`pyramid` terms, although this terminology can be a bit confusing: see :ref:`model_traversal_confusion`. traversal The act of descending "down" a graph of model objects from a root - model in order to find a :term:`context`. The :mod:`repoze.bfg` + model in order to find a :term:`context`. The :mod:`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 @@ -153,15 +153,15 @@ Glossary router The :term:`WSGI` application created when you start a - :mod:`repoze.bfg` application. The router intercepts requests, + :mod:`pyramid` application. The router intercepts requests, invokes traversal and/or URL dispatch, calls view functions, and returns responses to the WSGI server on behalf of your - :mod:`repoze.bfg` application. + :mod:`pyramid` application. URL dispatch An alternative to graph traversal as a mechanism for locating a :term:`context` for a :term:`view`. When you use a :term:`route` - in your :mod:`repoze.bfg` application via a :term:`route + in your :mod:`pyramid` application via a :term:`route configuration`, you are using URL dispatch. See the :ref:`urldispatch_chapter` for more information. @@ -178,10 +178,10 @@ Glossary application registry A registry of configuration information consulted by - :mod:`repoze.bfg` while servicing an application. An application + :mod:`pyramid` while servicing an application. An application registry maps model types to views, as well as housing other application-specific component registrations. Every - :mod:`repoze.bfg` application has one (and only one) application + :mod:`pyramid` application has one (and only one) application registry. template @@ -235,7 +235,7 @@ Glossary authentication The act of determining that the credentials a user presents during a particular request are "good". Authentication in - :mod:`repoze.bfg` is performed via an :term:`authentication + :mod:`pyramid` is performed via an :term:`authentication policy`. authorization @@ -243,7 +243,7 @@ Glossary action. In bfg terms, this means determining whether, for a given context, any :term:`principal` (or principals) associated with the request have the requisite :term:`permission` to allow the request - to continue. Authorization in :mod:`repoze.bfg` is performed via + to continue. Authorization in :mod:`pyramid` is performed via its :term:`authorization policy`. principal @@ -256,21 +256,21 @@ Glossary "group foo" and "group bar". authorization policy - An authorization policy in :mod:`repoze.bfg` terms is a bit of + An authorization policy in :mod:`pyramid` terms is a bit of code which has an API which determines whether or not the principals associated with the request can perform an action associated with a permission, based on the information found on the :term:`context`. authentication policy - An authentication policy in :mod:`repoze.bfg` terms is a bit of + An authentication policy in :mod:`pyramid` terms is a bit of code which has an API which determines the current :term:`principal` (or principals) associated with a request. WSGI `Web Server Gateway Interface `_. This is a Python standard for connecting web applications to web servers, - similar to the concept of Java Servlets. ``repoze.bfg`` requires + similar to the concept of Java Servlets. ``pyramid`` requires that your application be served as a WSGI application. middleware @@ -318,7 +318,7 @@ Glossary PasteDeploy `PasteDeploy `_ is a library used by - :mod:`repoze.bfg` which makes it possible to configure + :mod:`pyramid` which makes it possible to configure :term:`WSGI` components together declaratively within an ``.ini`` file. It was developed by Ian Bicking as part of :term:`Paste`. @@ -329,7 +329,7 @@ Glossary maintained by Malthe Borch. It has several extensions, such as the ability to use bracketed (Genshi-style) ``${name}`` syntax, even within ZPT. It is also much faster than the reference - implementations of both ZPT and Genshi. :mod:`repoze.bfg` offers + implementations of both ZPT and Genshi. :mod:`pyramid` offers Chameleon templating out of the box in ZPT and text flavors. ZPT @@ -352,7 +352,7 @@ Glossary Routes A `system by Ben Bangert `_ which parses URLs and compares them against a number of user defined - mappings. The URL pattern matching syntax in :mod:`repoze.bfg` is + mappings. The URL pattern matching syntax in :mod:`pyramid` is inspired by the Routes syntax (which was inspired by Ruby On Rails pattern syntax). @@ -372,11 +372,11 @@ Glossary ZCML `Zope Configuration Markup Language `_, an XML dialect - used by Zope and :mod:`repoze.bfg` for configuration tasks. ZCML + used by Zope and :mod:`pyramid` for configuration tasks. ZCML is capable of performing different types of :term:`configuration - declaration`, but its primary purpose in :mod:`repoze.bfg` is to + declaration`, but its primary purpose in :mod:`pyramid` is to perform :term:`view configuration` and :term:`route configuration` - within the ``configure.zcml`` file in a :mod:`repoze.bfg` + within the ``configure.zcml`` file in a :mod:`pyramid` application. You can use ZCML as an alternative to :term:`imperative configuration`. @@ -391,7 +391,7 @@ Glossary `_ (aka ZCA) is a system which allows for application pluggability and complex dispatching based on objects which implement an :term:`interface`. - :mod:`repoze.bfg` uses the ZCA "under the hood" to perform view + :mod:`pyramid` uses the ZCA "under the hood" to perform view dispatching and other application configuration tasks. reStructuredText @@ -402,7 +402,7 @@ Glossary root The object at which :term:`traversal` begins when - :mod:`repoze.bfg` searches for a :term:`context` (for :term:`URL + :mod:`pyramid` searches for a :term:`context` (for :term:`URL Dispatch`, the root is *always* the context). subpath @@ -415,26 +415,26 @@ Glossary interface A `Zope interface `_ - object. In :mod:`repoze.bfg`, an interface may be attached to a + object. In :mod:`pyramid`, an interface may be attached to a :term:`model` object or a :term:`request` object in order to identify that the object is "of a type". Interfaces are used - internally by :mod:`repoze.bfg` to perform view lookups and other + internally by :mod:`pyramid` to perform view lookups and other policy lookups. The ability to make use of an interface is exposed to an application programmers during :term:`view configuration` via the ``context`` argument, the ``request_type`` argument and the ``containment`` argument. Interfaces are also exposed to application developers when they make use of the - :term:`event` system. Fundamentally, :mod:`repoze.bfg` + :term:`event` system. Fundamentally, :mod:`pyramid` programmers can think of an interface as something that they can attach to an object that stamps it with a "type" unrelated to its underlying Python type. Interfaces can also be used to describe the behavior of an object (its methods and attributes), but - unless they choose to, :mod:`repoze.bfg` programmers do not need + unless they choose to, :mod:`pyramid` programmers do not need to understand or use this feature of interfaces. event An object broadcast to zero or more :term:`subscriber` callables - during normal :mod:`repoze.bfg` system operations during the + during normal :mod:`pyramid` system operations during the lifetime of an application. Application code can subscribe to these events by using the subscriber functionality described in :ref:`events_chapter`. @@ -448,32 +448,32 @@ Glossary request type An attribute of a :term:`request` that allows for specialization of view invocation based on arbitrary categorization. The every - :term:`request` object that :mod:`repoze.bfg` generates and + :term:`request` object that :mod:`pyramid` generates and manipulates has one or more :term:`interface` objects attached to it. The default interface attached to a request object is - ``repoze.bfg.interfaces.IRequest``. + ``pyramid.interfaces.IRequest``. repoze.lemonade Zope2 CMF-like `data structures and helper facilities `_ for CA-and-ZODB-based - applications useful within :mod:`repoze.bfg` applications. + applications useful within :mod:`pyramid` applications. repoze.catalog An indexing and search facility (fielded and full-text) based on `zope.index `_. See `the documentation `_ for more - information. A tutorial for its usage in :mod:`repoze.bfg` + information. A tutorial for its usage in :mod:`pyramid` exists in :ref:`catalog_tutorial`. repoze.who `Authentication middleware `_ for - :term:`WSGI` applications. It can be used by :mod:`repoze.bfg` to + :term:`WSGI` applications. It can be used by :mod:`pyramid` to provide authentication information. repoze.workflow `Barebones workflow for Python apps `_ . It can be used by - :mod:`repoze.bfg` to form a workflow system. + :mod:`pyramid` to form a workflow system. virtual root A model object representing the "virtual" root of a request; this @@ -490,11 +490,11 @@ Glossary object in a lineage is available as its ``__parent__`` attribute. root factory - The "root factory" of an :mod:`repoze.bfg` application is called + The "root factory" of an :mod:`pyramid` application is called on every request sent to the application. The root factory returns the traversal root of an application. It is conventionally named ``get_root``. An application may supply a - root factory to :mod:`repoze.bfg` during the construction of a + root factory to :mod:`pyramid` during the construction of a :term:`Configurator`. If a root factory is not supplied, the application uses a default root object. Use of the default root object is useful in application which use :term:`URL dispatch` for @@ -524,7 +524,7 @@ Glossary `mod_wsgi `_ is an Apache module developed by Graham Dumpleton. It allows :term:`WSGI` applications (such as applications developed using - :mod:`repoze.bfg`) to be served using the Apache web server. + :mod:`pyramid`) to be served using the Apache web server. view predicate An argument to a :term:`view configuration` which evaluates to @@ -548,7 +548,7 @@ Glossary predicate A test which returns ``True`` or ``False``. Two different types - of predicates exist in :mod:`repoze.bfg`: a :term:`view predicate` + of predicates exist in :mod:`pyramid`: a :term:`view predicate` and a :term:`route predicate`. View predicates are attached to :term:`view configuration` and route predicates are attached to :term:`route configuration`. @@ -556,13 +556,13 @@ Glossary decorator A wrapper around a Python function or class which accepts the function or class as its first argument and which returns an - arbitrary object. :mod:`repoze.bfg` provides several decorators, + arbitrary object. :mod:`pyramid` provides several decorators, used for configuration and return value modification purposes. See also `PEP 318 `_. configuration declaration An individual method call made to an instance of a - :mod:`repoze.bfg` :term:`Configurator` object which performs an + :mod:`pyramid` :term:`Configurator` object which performs an arbitrary action, such as registering a :term:`view configuration` (via the ``view`` method of the configurator) or :term:`route configuration` (via the ``route`` method of the configurator). A @@ -572,19 +572,21 @@ Glossary of code in a package. configuration decoration + Metadata implying one or more :term:`configuration declaration` invocations. Often set by configuration Python :term:`decorator` - attributes, such as ``repoze.bfg.view.bfg_view``, aka ``@bfg_view``. + attributes, such as :class:`pyramid.view.view_config`, aka + ``@view_config``. scan - The term used by :mod:`repoze.bfg` to define the process of + The term used by :mod:`pyramid` to define the process of importing and examining all code in a Python package or module for :term:`configuration decoration`. configurator An object used to do :term:`configuration declaration` within an application. The most common configurator is an instance of the - ``repoze.bfg.configuration.Configurator`` class. + ``pyramid.configuration.Configurator`` class. imperative configuration The configuration mode in which you use Python to call methods on @@ -596,28 +598,28 @@ Glossary a set of :term:`configuration declaration` statements. Not Found view - An :term:`exception view` invoked by :mod:`repoze.bfg` when the - developer explicitly raises a ``repoze.bfg.exceptions.NotFound`` + An :term:`exception view` invoked by :mod:`pyramid` when the + developer explicitly raises a ``pyramid.exceptions.NotFound`` exception from within :term:`view` code or :term:`root factory` code, or when the current request doesn't match any :term:`view - configuration`. :mod:`repoze.bfg` provides a default + configuration`. :mod:`pyramid` provides a default implementation of a not found view; it can be overridden. See :ref:`changing_the_notfound_view`. Forbidden view - An :term:`exception view` invoked by :mod:`repoze.bfg` when the + An :term:`exception view` invoked by :mod:`pyramid` when the developer explicitly raises a - ``repoze.bfg.exceptions.Forbidden`` exception from within + ``pyramid.exceptions.Forbidden`` exception from within :term:`view` code or :term:`root factory` code, or when the :term:`view configuration` and :term:`authorization policy` found for a request disallows a particular view invocation. - :mod:`repoze.bfg` provides a default implementation of a + :mod:`pyramid` provides a default implementation of a forbidden view; it can be overridden. See :ref:`changing_the_forbidden_view`. Exception view An exception view is a :term:`view callable` which may be - invoked by :mod:`repoze.bfg` when an exception is raised during + invoked by :mod:`pyramid` when an exception is raised during request processing. See :ref:`exception_views` for more information. @@ -627,7 +629,7 @@ Glossary each `thread ` used by the application may have a different value for this same "global" - variable. :mod:`repoze.bfg` uses a small number of thread local + variable. :mod:`pyramid` uses a small number of thread local variables, as described in :ref:`threadlocals_chapter`. See also the `threading.local documentation ` @@ -653,7 +655,7 @@ Glossary Python The `programming language ` in which - :mod:`repoze.bfg` is written. + :mod:`pyramid` is written. CPython The C implementation of the Python language. This is the @@ -671,7 +673,7 @@ Glossary The act of locating a :term:`context` and a :term:`view name` given a :term:`request`. :term:`Traversal` and :term:`URL dispatch` are the context finding subsystems used by - :mod:`repoze.bfg`. + :mod:`pyramid`. Triad The three bits of information used by :term:`view lookup` to find @@ -681,18 +683,18 @@ Glossary Google App Engine `Google App Engine `_ (aka "GAE") is a Python application hosting service offered by Google. - :mod:`repoze.bfg` runs on GAE. + :mod:`pyramid` runs on GAE. Venusian `Venusian `_ is a library which allows framework authors to defer decorator actions. Instead of taking actions when a function (or class) decorator is executed at import time, the action usually taken by the decorator is - deferred until a separate "scan" phase. :mod:`repoze.bfg` relies + deferred until a separate "scan" phase. :mod:`pyramid` relies on Venusian to provide a basis for its :term:`scan` feature. Translation String - An instance of :class:`repoze.bfg.i18n.TranslationString`, which + An instance of :class:`pyramid.i18n.TranslationString`, which is a class that behaves like a Unicode string, but has several extra attributes such as ``domain``, ``msgid``, and ``mapping`` for use during translation. Translation strings are usually @@ -712,7 +714,7 @@ Glossary A callable which receives a :term:`translation string` and returns a translated Unicode object for the purposes of internationalization. A :term:`localizer` supplies a - translator to a :mod:`repoze.bfg` application accessible via its + translator to a :mod:`pyramid` application accessible via its ``translate`` method. Translation Directory @@ -724,10 +726,10 @@ Glossary (minus the .mo extension) is the translation domain name. Localizer - An instance of the class :class:`repoze.bfg.i18n.Localizer` which + An instance of the class :class:`pyramid.i18n.Localizer` which provides translation and pluralization services to an application. It is retrieved via the - :func:`repoze.bfg.i18n.get_localizer` function. + :func:`pyramid.i18n.get_localizer` function. Locale Name A string like ``en``, ``en_US``, ``de``, or ``de_AT`` which @@ -740,19 +742,19 @@ Glossary Locale Negotiator An object supplying a policy determining which :term:`locale name` best represents a given :term:`request`. It is used by the - :func:`repoze.bfg.i18n.get_locale_name`, and - :func:`repoze.bfg.i18n.negotiate_locale_name` functions, and - indirectly by :func:`repoze.bfg.i18n.get_localizer`. The - :func:`repoze.bfg.i18n.default_locale_negotiator` function + :func:`pyramid.i18n.get_locale_name`, and + :func:`pyramid.i18n.negotiate_locale_name` functions, and + indirectly by :func:`pyramid.i18n.get_localizer`. The + :func:`pyramid.i18n.default_locale_negotiator` function is an example of a locale negotiator. Gettext The GNU `gettext `_ - library, used by the :mod:`repoze.bfg` translation machinery. + library, used by the :mod:`pyramid` translation machinery. Babel A `collection of tools `_ for - internationalizing Python applications. :mod:`repoze.bfg` does + internationalizing Python applications. :mod:`pyramid` does not depend on Babel to operate, but if Babel is installed, additional locale functionality becomes available to your application. @@ -797,11 +799,11 @@ Glossary pregenerator A pregenerator is a function associated by a developer with a - :term:`route`. It is called by :func:`repoze.bfg.url.route_url` + :term:`route`. It is called by :func:`pyramid.url.route_url` in order to adjust the set of arguments passed to it by the user for special purposes. It will influence the URL returned by ``route_url``. See - :class:`repoze.bfg.interfaces.IRoutePregenerator` for more + :class:`pyramid.interfaces.IRoutePregenerator` for more information. session -- cgit v1.2.3