Re: [Zope] The product I made isn't in the product management page
I got it to work.. thank a lot everyone, couldn't hav done it without you guys. - Original Message From: Andreas Jung <[EMAIL PROTECTED]> To: Maciej Wisniowski <[EMAIL PROTECTED]>; Allen Huang <[EMAIL PROTECTED]> Cc: Zope Sent: Wednesday, January 3, 2007 3:13:48 PM Subject: Re: [Zope] The product I made isn't in the product management page -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - --On 3. Januar 2007 07:59:23 +0100 Maciej Wisniowski <[EMAIL PROTECTED]> wrote: > >> What is the problem here? >> > As Marco said use SimpleItem as base class and > add: > > from Globals import InitializeClass > (...) > InitializeClass(helloClass) > > to helloModule.py. > > You'll need security declarations too. > > Take may take a look at > http://www.upfrontsystems.co.za/courses/zope/ch04.html > In addition: look at the Zope Developer Guide. You need to read the docs before starting trial-and-error programming. - -aj -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (Darwin) iD8DBQFFm1esCJIWIbr9KYwRAoBdAJ0am9MXaaFEIerfy7LchFM/e+XB4gCgkcq8 /uW0/m1+bwfWceu/3qgX0y8= =30W2 -END PGP SIGNATURE- __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] The product I made isn't in the product management page
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - --On 3. Januar 2007 07:59:23 +0100 Maciej Wisniowski <[EMAIL PROTECTED]> wrote: > >> What is the problem here? >> > As Marco said use SimpleItem as base class and > add: > > from Globals import InitializeClass > (...) > InitializeClass(helloClass) > > to helloModule.py. > > You'll need security declarations too. > > Take may take a look at > http://www.upfrontsystems.co.za/courses/zope/ch04.html > In addition: look at the Zope Developer Guide. You need to read the docs before starting trial-and-error programming. - -aj -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (Darwin) iD8DBQFFm1esCJIWIbr9KYwRAoBdAJ0am9MXaaFEIerfy7LchFM/e+XB4gCgkcq8 /uW0/m1+bwfWceu/3qgX0y8= =30W2 -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] The product I made isn't in the product management page
> What is the problem here? > As Marco said use SimpleItem as base class and add: from Globals import InitializeClass (...) InitializeClass(helloClass) to helloModule.py. You'll need security declarations too. Take may take a look at http://www.upfrontsystems.co.za/courses/zope/ch04.html -- Maciej Wisniowski ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] The product I made isn't in the product management page
thanks for repling Marco. I'm using a window version of zope and linux command 'zopectl fg' doesn't work. what is the forground command in windows? Is the "run in console" the same as forground?? - Original Message From: Marco Bizzarri <[EMAIL PROTECTED]> To: Allen Huang <[EMAIL PROTECTED]> Cc: Zope Sent: Wednesday, January 3, 2007 11:48:59 AM Subject: Re: [Zope] The product I made isn't in the product management page Two suggestions: 1) run zope in foreground, so that you can see if Zope is complaining about your project; 2) make helloClass derive from OFS.SimpleItem.SimpleItem. Regards Marco On 1/3/07, Allen Huang <[EMAIL PROTECTED]> wrote: > > > > I'm using Zope 2.8.8 and I trying to make my own product. > > > > Whenever I make a product with errors in the python coding, I could see my > product name registered in the product management page. But when I fix all > the error, the product disappears; it not in the product management page or > the add menu. > > > > What is the problem here? > > > > here is my coding > > > > __init__.py > > --- > > import helloModule > > def initialize(context): > context.registerClass( > helloModule.helloClass, > permission="Add Hello Object", > constructor=( > helloModule.manage_addHelloForm, > helloModule.manage_addHello > ) > ) > > > > > helloModule.py > > > > def manage_addHelloForm(self): > " Form for adding a Hello Object " > return """ > > > > > > > > > > > > > """ > > def manage_addHello(self): > " Method for adding a Hello Object " > newHello=helloClass(id) > self._setObject(id, newHello) > return self.manage_main(self, REQUEST) > > class helloClass: > meta_type='Hello Object' > > def __init__(self, name='World'): > self.name=name > > def saySomething(self): > return "Hello, " + self.name > > def edit(self, name): > self.name=name > > __ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > ___ > Zope maillist - Zope@zope.org > http://mail.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://mail.zope.org/mailman/listinfo/zope-announce > http://mail.zope.org/mailman/listinfo/zope-dev ) > > > -- Marco Bizzarri http://iliveinpisa.blogspot.com/ __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] The product I made isn't in the product management page
Two suggestions: 1) run zope in foreground, so that you can see if Zope is complaining about your project; 2) make helloClass derive from OFS.SimpleItem.SimpleItem. Regards Marco On 1/3/07, Allen Huang <[EMAIL PROTECTED]> wrote: I'm using Zope 2.8.8 and I trying to make my own product. Whenever I make a product with errors in the python coding, I could see my product name registered in the product management page. But when I fix all the error, the product disappears; it not in the product management page or the add menu. What is the problem here? here is my coding __init__.py --- import helloModule def initialize(context): context.registerClass( helloModule.helloClass, permission="Add Hello Object", constructor=( helloModule.manage_addHelloForm, helloModule.manage_addHello ) ) helloModule.py def manage_addHelloForm(self): " Form for adding a Hello Object " return """ """ def manage_addHello(self): " Method for adding a Hello Object " newHello=helloClass(id) self._setObject(id, newHello) return self.manage_main(self, REQUEST) class helloClass: meta_type='Hello Object' def __init__(self, name='World'): self.name=name def saySomething(self): return "Hello, " + self.name def edit(self, name): self.name=name __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Marco Bizzarri http://iliveinpisa.blogspot.com/ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] The product I made isn't in the product management page
I'm using Zope 2.8.8 and I trying to make my own product. Whenever I make a product with errors in the python coding, I could see my product name registered in the product management page. But when I fix all the error, the product disappears; it not in the product management page or the add menu. What is the problem here? here is my coding __init__.py --- import helloModule def initialize(context): context.registerClass( helloModule.helloClass, permission="Add Hello Object", constructor=( helloModule.manage_addHelloForm, helloModule.manage_addHello ) ) helloModule.py def manage_addHelloForm(self): " Form for adding a Hello Object " return """ """ def manage_addHello(self): " Method for adding a Hello Object " newHello=helloClass(id) self._setObject(id, newHello) return self.manage_main(self, REQUEST) class helloClass: meta_type='Hello Object' def __init__(self, name='World'): self.name=name def saySomething(self): return "Hello, " + self.name def edit(self, name): self.name=name __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )