[Zope] Creating products

Dustin Mitchell dustin at ywlcs.org
Sun Aug 17 14:03:40 EDT 2003


On Sun, Aug 17, 2003 at 10:54:14AM -0700, Dylan Reinhardt wrote:
> On Sun, 2003-08-17 at 06:45, Dustin Mitchell wrote:
> > I can't seem to find the straight dope on this one in the
> > documentation.  
> 
> Yeah... once you get the recipe right, it's smooth sailing though.
> 
> Your problem probably stems from one (or more) of the following:
> 1. The product isn't installed correctly
> 2. Your classes aren't registered correctly
> 3. Your product isn't compiling
> 
> First off, is the product should consist of a folder with a main module
> and an initialization module called __init__ (if you don't have one of
> these, look at the Boring product for a good template).  
> 
> If you haven't done so already, add an empty file to your product folder
> called refresh.txt.  This will add a "refresh" tab to your product
> management screens and will greatly facilitate debugging.
> 
> You will need to restart Zope for it to "see" a newly-added product.
> 
> Having done that, are you able to see the product in the Products folder
> of the Control Panel in the ZMI?  Does it have a "broken" icon?  What do
> you see if you open the product's management screens?  Look at its
> refresh screen?
> 
> Check that out, take note of any tracebacks and let us know what you
> see.

Nope, product (which is already quite well along) is installed
correctly, adding from the ZMI works just fine, etc.

Inside the manage_addVolunteerSite :

  ...
  volunteersite.manage_addProduct['Volunteer'].manage_addVolunteerUserFolder()
  ...

causes:

  Error Type: AttributeError
  Error Value: _getProducts

the text is:

Traceback (innermost last):
  Module ZPublisher.Publish, line 98, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 39, in call_object
  Module Products.Volunteer.VolunteerSite, line 65, in manage_addVolunteerSite
  Module App.FactoryDispatcher, line 26, in __getitem__
  Module App.FactoryDispatcher, line 29, in __bobo_traverse__
AttributeError: _getProducts

However, this works:

  acl_users = VolunteerUserFolder()
  volunteersite._setObject('acl_users', acl_users);

but clearly isn't the best way to do things; besides, there will be
other circumstances when I will want to add products from Python Script
objects.

So what am I doing wrong?

Dustin

-- 

  Dustin Mitchell
  dustin at ywlcs.org/djmitche at alumni.uchicago.edu
  http://people.cs.uchicago.edu/~dustin/
  PGP Key: http://people.cs.uchicago.edu/~dustin/pubkey.txt                                                                                  



More information about the Zope mailing list