All modules published by Zope must have a "doc string" i.e. a Python comment
defining the content before any other Python code. For example:

""" Doc string for Frame Work Doc product """

import string

# etc

-- Loren

----- Original Message -----
From: "Daniel Rusch" <[EMAIL PROTECTED]>
To: "Loren Stafford" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: August 15, 2000 12:20 PM
Subject: [Zope] Another Product question


> Thanks,
>
> I had made a small misspelling which did not generate any errors but which
> hosed the Product.
>
> New problem,
>
> My product appears on the Product Management at /Control_Panel / Products
> page and in the drop down of Available Objects. I select my Product from
the
> drop down
> and I get my add product page. But when i fill out the page and click add,
I
> get the following error message:
>
>
>            Zope Error
>
>            Zope has encountered an error while publishing this resource.
>
>            Debugging Notice
>
>            Zope has encountered a problem publishing your object.
>
>            Missing doc string at:
> http://hal9000:8080/manage_addProduct/FrameWorkDoc/manage_addFrameWorkDoc
>
>
>            Troubleshooting Suggestions
>
>                 The URL may be incorrect.
>                 The parameters passed to this resource may be incorrect.
>                 A resource that this resource relies on may be
encountering
> an error.
>
>            For more detailed information about the error, please refer to
> the HTML source for this page.
>
>            If the error persists please contact the site maintainer. Thank
> you for your patience.
>
>
> Traceback (innermost last):
>   File /home/Zope-2.1.6-linux2-x86/lib/python/ZPublisher/Publish.py, line
> 214, in publish_module
>   File /home/Zope-2.1.6-linux2-x86/lib/python/ZPublisher/Publish.py, line
> 179, in publish
>   File /home/Zope-2.1.6-linux2-x86/lib/python/Zope/__init__.py, line 202,
in
> zpublisher_exception_hook
>   File /home/Zope-2.1.6-linux2-x86/lib/python/ZPublisher/Publish.py, line
> 151, in publish
>   File /home/Zope-2.1.6-linux2-x86/lib/python/ZPublisher/BaseRequest.py,
> line 348, in traverse
>   File /home/Zope-2.1.6-linux2-x86/lib/python/ZPublisher/HTTPResponse.py,
> line 521, in debugError
> NotFound: (see above)
>
> Any thoughts ???
>
> Dan
>
> Loren Stafford wrote:
>
> > From: "Daniel Rusch" <[EMAIL PROTECTED]>
> >
> > > I've created a product, installed it and it appears on the Product
> > > Management at /Control_Panel / Products list.
> > >
> > > The question is how do I get it to appear in the drop down of
Available
> > > Objects?
> > >
> >
> > You have to register the class it defines. If you want the class to be
> > subclassable by ZClasses, you also have to registerBaseClass. Here's an
> > example copied from the __init__.py of my Xron product:
> >
> >       context.registerClass(
> >         XronDTMLMethod.XronDTMLMethod,
> >         permission = 'Add Scheduled Method',
> >         constructors = (
> >           XronDTMLMethod.manage_addXronDTMLMethodForm,
> >           XronDTMLMethod.manage_addXronDTMLMethod),
> >         icon = 'www/Event.gif')
> >       context.registerBaseClass(XronDTMLMethod.XronDTMLMethod)
> >       context.registerHelp()
> >
> > -- HTH
> > -- Loren
> >
> > _______________________________________________
> > Zope maillist  -  [EMAIL PROTECTED]
> > http://lists.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope-dev )
>
>
> _______________________________________________
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>
>


_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to