[ZDP] BackTalk to Document Zope Developer's Guide (2.4 edition)/Zope Products
webmaster@zope.org
webmaster@zope.org
Sat, 30 Nov 2002 13:09:58 -0500
A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZDG/current/Products.stx#3-32
---------------
When Zope starts up it imports each product and calls the
product's 'initialize' function passing it a registrar object. The
'initialize' function uses the registrar to tell Zope about its
capabilities. Here is an example '__init__.py' file::
from PollProduct import PollProduct, addForm, addFunction
def initialize(registrar):
registrar.registerClass(
PollProduct,
constructors = (addForm, addFunction),
)
% Anonymous User - Nov. 30, 2002 1:09 pm:
The advice was to put addForm and addFuction to the Poll module, but here we're trying to import them from
the PollProduct module. Can this work?