summaryrefslogtreecommitdiff
path: root/docs/narr/models.rst
AgeCommit message (Collapse)Author
2010-12-18model -> resource; resource -> assetChris McDonough
2010-12-15- Fix reference to ``repoze.bfg.traversalwrapper`` in "Models" chapter (pointChris McDonough
at ``pyramid_traversalwrapper`` instead).
2010-12-15fix description of models based on zzzeeek's reddit commentChris McDonough
2010-12-15add missing last sentenceCasey Duncan
2010-12-15clarify how __parent__ and __name__ relate to containers recursivelyCasey Duncan
2010-12-14shorten parenthetical for readability, add word modelCasey Duncan
2010-12-14move sidebar about automatically managing __name__ and __parent__ after ↵Casey Duncan
explaining what they are
2010-12-14describe container nodes and leaf nodes as such directlyCasey Duncan
2010-12-14clarify declaring an interface on a model instance vs. a classCasey Duncan
2010-12-14remove quotes, classes are wholly callableCasey Duncan
2010-12-14reword graph walking bulletCasey Duncan
2010-12-09fix docs: pyramid.configuration -> pyramid.configChris McDonough
2010-11-28Normalized narrative doc, code with linenos while text+bash don'tBlaise Laflamme
2010-11-09- All references to Pyramid-the-application were changed from :mod:`pyramid`Chris McDonough
to :app:`Pyramid`. A custom role setting was added to ``docs/conf.py`` to allow for this. (internal)
2010-10-25convert narrative docs to PyramidChris McDonough
2010-03-20just two small fixes hereCarlos de la Guardia
2010-01-19Spellcheck.Chris McDonough
2010-01-18Prep for b1Chris McDonough
Merge a bunch of paper-based docs fixes Configure logging during bfgshell.
2010-01-17More reviews finished.Chris McDonough
2010-01-11Merge of andrew-docs branch.Chris McDonough
2009-12-27- Added manual index entries to generated index.Chris McDonough
2009-12-25Fix syntax errors found via manuel, and add manuel-style markers to preventChris McDonough
untestable code blocks from being tested.
2009-12-22Roles.Chris McDonough
2009-12-10Docs.Chris McDonough
2009-11-22Rendering tweaks.Chris McDonough
2009-10-26Adapt to ``ITraverser`` instead of ``ITraverserFactory``. While this change ↵Malthe Borch
breaks backwards compatibility, migration is trivial.
2009-07-05Spellcheck.Chris McDonough
2009-07-03General editing walkthrough.Chris McDonough
2009-05-21Tweaks.Chris McDonough
2009-05-01- In previous releases, the ``repoze.bfg.url.model_url``,Chris McDonough
``repoze.bfg.traversal.model_path`` and ``repoze.bfg.traversal.model_path_tuple`` functions always ignored the ``__name__`` argument of the root object in a model graph ( effectively replacing it with a leading ``/`` in the returned value) when a path or URL was generated. The code required to perform this operation was not efficient. As of this release, the root object in a model graph *must* have a ``__name__`` attribute that is either ``None`` or the empty string (``''``) for URLs and paths to be generated properly from these APIs. If your root model object has a ``__name__`` argument that is not one of these values, you will need to change your code for URLs and paths to be generated properly. If your model graph has a root node with a string ``__name__`` that is not null, the value of ``__name__`` will be prepended to every path and URL generated.
2009-05-01- The ``repoze.bfg.location.LocationProxy`` class and theChris McDonough
``repoze.bfg.location.ClassAndInstanceDescr`` class have both been removed in order to be able to eventually shed a dependency on ``zope.proxy``. Neither of these classes was ever an API. - In all previous releases, the ``repoze.bfg.location.locate`` function worked like so: if a model did not explicitly provide the ``repoze.bfg.interfaces.ILocation`` interface, ``locate`` returned a ``LocationProxy`` object representing ``model`` with its ``__parent__`` attribute assigned to ``parent`` and a ``__name__`` attribute assigned to ``__name__``. In this release, the ``repoze.bfg.location.locate`` function simply jams the ``__name__`` and ``__parent__`` attributes on to the supplied model unconditionally, no matter if the object implements ILocation or not, and it never returns a proxy. This was done because the LocationProxy behavior has now moved into an add-on package (``repoze.bfg.traversalwrapper``), in order to eventually be able to shed a dependency on ``zope.proxy``. - In all previous releases, by default, if traversal was used (as opposed to URL-dispatch), and the root object supplied the``repoze.bfg.interfaces.ILocation`` interface, but the children returned via its ``__getitem__`` returned an object that did not implement the same interface, :mod:`repoze.bfg` provided some implicit help during traversal. This traversal feature wrapped subobjects from the root (and thereafter) that did not implement ``ILocation`` in proxies which automatically provided them with a ``__name__`` and ``__parent__`` attribute based on the name being traversed and the previous object traversed. This feature has now been removed from the base ``repoze.bfg`` package for purposes of eventually shedding a dependency on ``zope.proxy``. In order to re-enable the wrapper behavior for older applications which cannot be changed, register the "traversalwrapper" ``ModelGraphTraverser`` as the traversal policy, rather than the default ``ModelGraphTraverser``. To use this feature, you will need to install the ``repoze.bfg.traversalwrapper`` package (an add-on package, available at http://svn.repoze.org/repoze.bfg.traversalwrapper) Then change your application's ``configure.zcml`` to include the following stanza: <adapter factory="repoze.bfg.traversalwrapper.ModelGraphTraverser" provides="repoze.bfg.interfaces.ITraverserFactory" for="*" /> When this ITraverserFactory is used instead of the default, no object in the graph (even the root object) must supply a ``__name__`` or ``__parent__`` attribute. Even if subobjects returned from the root *do* implement the ILocation interface, these will still be wrapped in proxies that override the object's "real" ``__parent__`` and ``__name__`` attributes. See also changes to the "Models" chapter of the documentation (in the "Location-Aware Model Instances") section.
2009-04-30Make ModelGraphTraverser assume that all traversed objects provide ↵Chris McDonough
ILocation. Make WrappingModelGraphTraverser assume that *no* traversed objects provide ILocation. This makes it unnecessary to explain why the root object in a WrappingModelGraphTraverser setup needs to supply the ILocation interface. Now it doesn't.
2009-04-29Drop the ILocation testing by default during traversal.Tres Seaver
2009-01-23Path elements are always unicode during traversal now.Chris McDonough
2008-12-17Fix bug found by jpenney.Chris McDonough
2008-11-14Models-as-class-only.Chris McDonough
API functions that act against models.
2008-09-28(no commit message)Chris McDonough
2008-09-28 FeaturesChris McDonough
- A ``repoze.bfg.location`` API module was added. Backwards incompatibilities - Applications must now use the ``repoze.bfg.interfaces.ILocation`` interface rather than ``zope.location.interfaces.ILocation`` to represent that a model object is "location-aware". We've removed a dependency on ``zope.location`` for cleanliness purposes: as new versions of zope libraries are released which have improved dependency information, getting rid of our dependence on ``zope.location`` will prevent a newly installed repoze.bfg application from requiring the ``zope.security``, egg, which not truly used at all in a "stock" repoze.bfg setup. These dependencies are still required by the stack at this time; this is purely a futureproofing move. The security and model documentation for previous versions of ``repoze.bfg`` recommended using the ``zope.location.interfaces.ILocation`` interface to represent that a model object is "location-aware". This documentation has been changed to reflect that this interface should now be imported from ``repoze.bfg.interfaces.ILocation`` instead.
2008-07-290.2.5: add model_url.Chris McDonough
2008-07-28(no commit message)Chris McDonough
2008-07-28Tweaks.Chris McDonough
2008-07-26Tweaks.Chris McDonough
2008-07-25Temporarily hide step4, tweaks.Chris McDonough
2008-07-24Location proxies.Chris McDonough
2008-07-24Change more occurrences to mod:repozePaul Everitt
2008-07-18Yup.Chris McDonough