hello, I'm attempting to make my first Zope product but I have some problems to install it to test it behavior. I've just put my code under the /usr/lib/zope/lib/python/Products directory, but Zope doesn't load my product. Is there anything else to do ? (there is a __init__.py which initialize the product, I took MailHost as example to construct my product) In a more general way, I don't understand how to reinstall a product which has been removed from the Zope www control panel... Does the products live in the ZODB ? Is there any problems with installing a product in Zope for testing (code may change directly in the filesystem) ? I didn't found consistent information about how to construct Zope products from the SF instead of from the www interface, and I'ld be able to read a document which answer to all those questions :-) cheers -- Sylvain Thénault
"Sylvain" == Sylvain Thénault <thenault@nerim.net> writes:
Sylvain> hello, I'm attempting to make my first Zope product but I Sylvain> have some problems to install it to test it Sylvain> behavior. I've just put my code under the Sylvain> /usr/lib/zope/lib/python/Products directory, but Zope Sylvain> doesn't load my product. Is there anything else to do ? Sylvain> (there is a __init__.py which initialize the product, I Sylvain> took MailHost as example to construct my product) This is the right approach -- perhaps there is a bug in your code somewhere? Without seeing your code, it's hard to know where the problem is. Start with a minimal product, see below) and try to import that. You can grow from there. Sylvain> In a more general way, I don't understand how to Sylvain> reinstall a product which has been removed from the Zope Sylvain> www control panel... Does the products live in the ZODB ? Sylvain> Is there any problems with installing a product in Zope Sylvain> for testing (code may change directly in the filesystem) Sylvain> ? If you restart Zope, the product should reappear, as far as I know. As for working with test code, if you put a file called refresh.txt in your product dir, you can reload your product from the manager interface without restarting zope. Sylvain> I didn't found consistent information about how to Sylvain> construct Zope products from the SF instead of from the Sylvain> www interface, and I'ld be able to read a document which Sylvain> answer to all those questions :-) 3 very helpful resources for this, the maxm minimal product guides: http://www.zope.org/Members/maxm/HowTo/minimal_01 http://www.zope.org/Members/maxm/HowTo/minimal_02 and Chapter 4 of the Zope Developer's guide: http://www.zope.org/Documentation/ZDG You may also find the Boring Product Guide helpful http://www.zope.org/Members/gtk/Boring/HowTo-Boring Good luck, John Hunter
On Monday 13 May à 12:59, John Hunter wrote:
"Sylvain" == Sylvain Th?nault <thenault@nerim.net> writes:
Sylvain> hello, I'm attempting to make my first Zope product but I Sylvain> have some problems to install it to test it Sylvain> behavior. I've just put my code under the Sylvain> /usr/lib/zope/lib/python/Products directory, but Zope Sylvain> doesn't load my product. Is there anything else to do ? Sylvain> (there is a __init__.py which initialize the product, I Sylvain> took MailHost as example to construct my product)
This is the right approach -- perhaps there is a bug in your code somewhere? Without seeing your code, it's hard to know where the problem is. Start with a minimal product, see below) and try to import that. You can grow from there.
Sylvain> In a more general way, I don't understand how to Sylvain> reinstall a product which has been removed from the Zope Sylvain> www control panel... Does the products live in the ZODB ? Sylvain> Is there any problems with installing a product in Zope Sylvain> for testing (code may change directly in the filesystem) Sylvain> ?
If you restart Zope, the product should reappear, as far as I know. As for working with test code, if you put a file called refresh.txt in your product dir, you can reload your product from the manager interface without restarting zope.
Sylvain> I didn't found consistent information about how to Sylvain> construct Zope products from the SF instead of from the Sylvain> www interface, and I'ld be able to read a document which Sylvain> answer to all those questions :-)
3 very helpful resources for this, the maxm minimal product guides:
http://www.zope.org/Members/maxm/HowTo/minimal_01 http://www.zope.org/Members/maxm/HowTo/minimal_02
and Chapter 4 of the Zope Developer's guide:
http://www.zope.org/Documentation/ZDG
You may also find the Boring Product Guide helpful
http://www.zope.org/Members/gtk/Boring/HowTo-Boring
Good luck, John Hunter
thanks for your answer and for the links. Actually my product is now loaded by Zope. It's appeared just after I had installed another product (ZRoundup). Strange... -- Sylvain Thénault
participants (2)
-
John Hunter -
Sylvain Thénault