Skip to content

Commit

Permalink
Drop some subsections. (#549)
Browse files Browse the repository at this point in the history
* Drop subsection testing.

As there is no information about the mentioned "builtin support" for
testing.

A link to the testing section is already in the table of contents.

modified:   docs/zdgbook/ObjectPublishing.rst

* Drop subsection "Publishable Module".

The introductory sentence says it all: "If you are using the Zope
framework, this section will be irrelevant to you."

Also see discussion about "ZPublisher for Zope vs own module", see
#546 (comment)

modified:   docs/zdgbook/ObjectPublishing.rst

* Delete introductionary paragraph.

As it relates to the now deleted previous subsection.

modified:   docs/zdgbook/ObjectPublishing.rst
  • Loading branch information
jugmac00 authored and dataflake committed Apr 14, 2019
1 parent 77d2b99 commit 8f19de0
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions docs/zdgbook/ObjectPublishing.rst
Expand Up @@ -604,44 +604,9 @@ Finally, traversal security can be circumvented with the
in Chapter 8, "Security".


Testing
-------

ZPublisher comes with built-in support for testing and working with
the Python debugger. This topic is covered in more detail in Chapter
7, "Testing and Debugging".

Publishable Module
------------------

If you are using the Zope framework, this section will be irrelevant
to you. However, if you are publishing your own modules with
'ZPublisher' read on.

The publisher begins the traversal process by locating an object in
the module's global namespace that corresponds to the first element of
the path. Alternately the first object can be located by one of two
hooks.

If the module defines a 'web_objects' or 'bobo_application' object,
the first object is searched for in those objects. The search happens
according to the normal rules of traversal, using '__bobo_traverse__',
'getattr', and '__getitem__'.

The module can receive callbacks before and after traversal. If the
module defines a '__bobo_before__' object, it will be called with no
arguments before traversal. Its return value is ignored. Likewise,
if the module defines a '__bobo_after__' object, it will be called
after traversal with no arguments. These callbacks can be used for
things like acquiring and releasing locks.

Calling the Published Object
----------------------------

Now that we've covered how the publisher located the published object
and what it does with the results of calling it, let's take a closer
look at how the published object is called.

The publisher marshals arguments from the request and automatically
makes them available to the published object. This allows you to
accept parameters from web forms without having to parse the
Expand Down

0 comments on commit 8f19de0

Please sign in to comment.