The FAQ is here: http://wiki.zope.org/zope3/FAQ

Did you activate the "browser" submodule?
By adding a <include package=".browser"> in the recipe configure.zcml,
and the __init__.py in the browser submodule?

Christophe

Robert Norman a écrit :
Working through Web Component Development with Zope 3 Second Edition, I'm stuck just at the point it gets more interesting.

In the interactive debug session looking at a basic view, I get a lookup error at...

view = getMultiAdapter((lasagne, request), name=u'index.html')

I've confirmed that both lasagne, and request are objects.

the error reads in part, "line 103 in multiadapter ... zope.component.interfaces.ComponentLookupError.. .

And related to this, when I open the browser to the recipes stored in root

http://localhost:8080/minestrone

as the example shows, I get "The page that your are trying to access is not available", even though ministrone is in the root and shows up in the ZMI

I need help getting further in my studies. If there is a FAQ or archive if this list please let me know where it is.

(The configuration files and relevant py files are included)

Robert


------------------------------------------------------------------------

from zope.publisher.browser import BrowserPage

class ViewRecipe(BrowserPage):

    def __call__(self):
        response = self.request.response
        response.setHeader('Content-Type', 'text/plain')
        return self.context.name


------------------------------------------------------------------------

from persistent import Persistent
from zope.interface import implements
from worldcookery.interfaces import IRecipe

class Recipe(Persistent):
    implements(IRecipe)

    name = u''
    ingredients = []
    tools = []
    time_to_cook = 0
    description = u''

from zope.component.factory import Factory

recipeFactory = Factory(
    Recipe,
    title=u"Create a new recipe",
    description = u"This factory instantiates new recipes."
    )


------------------------------------------------------------------------

_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to