[Zope3-dev] Couldn't find view 's'

Florian Lindner mailinglists at xgm.de
Tue Oct 12 06:54:29 EDT 2004


Hallo,
when I try to open 
http://localhost:8080/++skin++centershock/gg/@@main.html: the object gg 
of type CEvent with skin centershock I got the following error:
A system error occured.
Log:

  File "C:\Python23\Lib\site-packages\zope\app\traversing\adapters.py", 
line 167
, in traversePathElement
    next_item = traversable.traverse(nm, further_path)
  File "C:\Python23\Lib\site-packages\zope\app\traversing\adapters.py", 
line 50,
 in traverse
    return subject[name]
  File 
"C:\Python23\Lib\site-packages\zope\app\basicskin\standardmacros.py", lin
e 42, in __getitem__
    page = getView(context, name, request)
  File "C:\Python23\Lib\site-packages\zope\component\__init__.py", line 
212, in
getView
    name, object, context, request)
ComponentLookupError: ("Couldn't find view", 's', <CS.Event.event.Event 
instance
 at 0x0144B238>, None, <zope.publisher.browser.BrowserRequest instance 
URL=http:
//localhost:8080/++skin++centershock/gg/@@main.html>)
127.0.0.1 - zope.anybody [12/Oct/2004:14:45:27 +0400] "GET 
/++skin++centershock/
gg/@@main.html HTTP/1.1" 200 292 "" "Mozilla/5.0 (Windows; U; Windows NT 
5.1; de
-DE; rv:1.7) Gecko/20040803 Firefox/0.9.3"


But I got no clue where zope takes this view s.

This is my configure.zcml in Event/skin:

<configure xmlns="http://namespaces.zope.org/browser">
<page
  for="CS.Event.interfaces.IEvent"
  name="main.html"
  permission="zope.View"
  layer="centershock"
  template="main.pt" />
</configure>

main.pt:

<html metal:use-macro="context/@@standard_macros/page">
  <body>
    <div id="content" metal:fill-slot="content" i18n:domain="centershock">
      <h2>Testskin for Event</h2>
    </div>
  </body>
</html>


configure.zcml in /skin

<configure xmlns="http://namespaces.zope.org/browser">
    <layer name="centershock"/>
    <skin name="centershock" layers="centershock rotterdam default" />
    <resource name="styles.css" file="styles.css" layer="centershock" />
    <page
        for="*"
        name="standard_macros"
        permission="zope.View"
        class=".standardmacros.StandardMacros"
        layer="centershock"
        allowed_interface="zope.interface.common.mapping.IItemMapping"
    />
    <page
        for="*"
        name="skin_macros"
        permission="zope.View"
        layer="centershock"
        template="template.pt"
    />
</configure>


standardmacros.py:

from zope.app.basicskin.standardmacros import StandardMacros as BaseMacros
class StandardMacros(BaseMacros):
    macro_pages = ('skin_macros')


template.pt:

<metal:block define-macro="page">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" 
i18n:domain="centershock">
  <head>
    <title metal:define-slot="title" tal:content="string:Z3: 
${context/zope:title_or_name}">centershock.net</title>
    <link rel="stylesheet" type="text/css" href="styles.css" 
tal:attributes="href string:${context/++resource++styles.css}" />
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <link rel="icon" type="image/png" tal:attributes="href 
context/++resource++favicon.png" />
  </head>
  <body>
    <metal:slot define-slot="content">
      Some content.
    </metal:slot>
  </body>
</html>
</metal:block>


configure.zcml in the root folder of my project:

<configure xmlns="http://namespaces.zope.org/zope">
    <include package=".skin" />
    <include package=".Event" />
</configure>

I got no idea what to do... If you need further information, please ask me!

Thanks for any help!

Florian







More information about the Zope3-dev mailing list