On Apr 2, 2008, at 8:49 AM, Markus Bleicher wrote:
deesto wrote:
In an "old-style" product imported into Buildout, where is the
proper place
for the 'PROJECTNAME = ' declaration? I assumed it would be here:
src/my.project/Products/MyProject/config.py
But this does not work:
NameError: name 'PROJECTNAME' is not defined
The config.py-file is the standard place to define PROJECTNAME.
But - as someone has already mentioned - you need to import it, i.e.
you need a line
from Products.MyProject.config import PROJECTNAME
in the file where python complains.
Thanks Markus. No complaints now on instance start-up, and the
product installs successfully in Plone as well. However, after
installing, browsing to a location in which the product could be used
in the site generates an error in Zope:
2008-04-02 10:04:45 ERROR CMFCore.TypesTool _queryFactoryMethod raised
an exception
Traceback (most recent call last):
File "parts/plone/CMFCore/TypesTool.py", line 386, in
_queryFactoryMethod
p = dispatcher[self.product]
File "parts/zope2/lib/python/App/FactoryDispatcher.py", line 46, in
__getitem__
return self.__bobo_traverse__(None, name)
File "parts/zope2/lib/python/App/FactoryDispatcher.py", line 49, in
__bobo_traverse__
product=self.aq_acquire('_getProducts')()._product(name)
File "parts/zope2/lib/python/App/Product.py", line 84, in _product
def _product(self, name): return getattr(self, name)
AttributeError: Product.MyProject
Maybe some name attribute still remains to be set? I apologize if I
should know what this means.
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers