[Zope3-Users] Creating edit form with z3c.form

Florian Lindner mailinglists at xgm.de
Sat Aug 18 06:53:49 EDT 2007


Hello,
I try to create an edit form with z3c.form but it gives me an system error 
only:

  File "/home/florian/Desktop/zope/lib/python/z3c/form/form.py", line 120, in 
updateWidgets
    self.widgets = zope.component.getMultiAdapter(
  File "/home/florian/Zope3/src/zope/component/_api.py", line 103, in 
getMultiAdapter
    raise ComponentLookupError(objects, interface, name)
ComponentLookupError: ((<zope.app.publisher.browser.viewmeta.EditEntry object 
at 0x9f6c68c>, <zope.publisher.browser.BrowserRequest instance 
URL=http://localhost:8080/Blog/2007_08_16_abc/EditEntry.html>, 
<Blog.blog.BlogEntry object at 0x9264d2c>), <InterfaceClass 
z3c.form.interfaces.IWidgets>, u'')
127.0.0.1 - - [18/Aug/2007:12:45:24 
+0200] "GET /Blog/2007_08_16_abc/EditEntry.html HTTP/1.1" 500 
89 "-" "Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.7 (like 
Gecko)"
127.0.0.1 - - [18/Aug/2007:12:45:25 +0200] "GET /favicon.ico HTTP/1.1" 404 
4159 "-" "Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.7 (like 
Gecko)"

My code looks like that:

from z3c.form import form, field
from z3c.formui import layout

class EditEntry(layout.FormLayoutSupport, form.EditForm):
    fields = field.Fields(IBlogEntry)

I've tried also some variations, for example with form.extends(form.EditForm).
It is registered like that:

    <page
        name="EditEntry.html"
        for="..interfaces.IBlogEntry"
        class=".views.EditEntry"
        permission="Blog.EditEntry"
    />

What is still missing?

Thanks,

Florian


More information about the Zope3-users mailing list