[Zope] Adding instance of ZDiscussions programmatically
Sun, 28 Jul 2002 04:18:55 -0700
> Dennis Allison wrote:
> > I've constructed a DTML Method per the How-To:
> > <dtml-var standard_html_header>
> > <dtml-call expr="REQUEST.set('id', 'newDiscussion')">
> > <dtml-call expr="REQUEST.set('title', 'The neDiscussion Title')">
> > <dtml-call expr="REQUEST.set('add_default_methods','yes')">
> > <dtml-with "manage_addProduct['ZDTopic']">
> > <dtml_call "ZDTopic_add(_.None, _, NoRedir=1)">
> > </dtml-with>
> > <dtml-var standard_html_footer>
> ug! That would be so much nicer as a python script...
> > | Zope Error
> > | Zope has encountered an error while publishing this resource.
> > | Error Type: AttributeError
> > | Error Value: ZDTopic
> It would appear you have no Product in Control_Panel/Products called
> ZDTopic, could you check?
Yup, there is no product called ZDTopic in the Control_Panel/Products
display. The ZDiscussions product (one of them nasty Z Classes)
shoulda been mentioned. But even when you do, it fails because the
constructor doesn't get found.