From eecdbc34962b00e35d41039af014462cf558acee Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 3 Jan 2010 03:39:30 +0000 Subject: Features -------- - The ``Configurator.add_view`` method now accepts an argument named ``context``. This is an alias for the older argument named ``for_``; it is preferred over ``for_``, but ``for_`` will continue to be supported "forever". - The ``view`` ZCML directive now accepts an attribute named ``context``. This is an alias for the older attribute named ``for``; it is preferred over ``for``, but ``for`` will continue to be supported "forever". - The ``Configurator.add_route`` method now accepts an argument named ``view_context``. This is an alias for the older argument named ``view_for``; it is preferred over ``view_for``, but ``view_for`` will continue to be supported "forever". - The ``route`` ZCML directive now accepts an attribute named ``view_context``. This is an alias for the older attribute named ``view_for``; it is preferred over ``view_for``, but ``view_for`` will continue to be supported "forever". Documentation and Paster Templates ---------------------------------- - All uses of the ``Configurator.add_view`` method that used its ``for_`` argument now use the ``context``argument instead. - All uses of the ``Configurator.add_route`` method that used its ``view_for`` argument now use the ``view_context``argument instead. - All uses of the ``view`` ZCML directive that used its ``for`` attribute now use the ``context`` attribute instead. - All uses of the ``route`` ZCML directive that used its ``view_for`` attribute now use the ``view_context`` attribute instead. --- docs/tutorials/bfgwiki/basiclayout.rst | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'docs/tutorials/bfgwiki/basiclayout.rst') diff --git a/docs/tutorials/bfgwiki/basiclayout.rst b/docs/tutorials/bfgwiki/basiclayout.rst index 5934799b9..f0bf8ced8 100644 --- a/docs/tutorials/bfgwiki/basiclayout.rst +++ b/docs/tutorials/bfgwiki/basiclayout.rst @@ -30,12 +30,13 @@ following: #. *Line 4*. Boilerplate, the comment explains. -#. *Lines 6-10*. Register a ```` that is ``for`` a class. - ``.views.my_view`` is a *function* we write (generated by the - ``bfg_zodb`` template) that is given a ``context`` and a - ``request`` and which returns a dictionary. The ``renderer`` tag - indicates that the ``templates/mytemplate.pt`` template should be - used to turn the dictionary returned by the view into a response. +#. *Lines 6-10*. Register a ```` that names a ``context`` type + that is a class. ``.views.my_view`` is a *function* we write + (generated by the ``bfg_zodb`` template) that is given a + ``context`` object and a ``request`` and which returns a + dictionary. The ``renderer`` tag indicates that the + ``templates/mytemplate.pt`` template should be used to turn the + dictionary returned by the view into a response. ``templates/mytemplate.pt`` is a *relative* path: it names the ``mytemplate.pt`` file which lives in the ``templates`` subdirectory of the directory in which this ``configure.zcml`` -- cgit v1.2.3