[Zope3-Users] Trying to use browser:form -> 404
Helmut Merz
helmutm at cy55.de
Sat Feb 11 06:44:37 EST 2006
Am Samstag, 11. Februar 2006 11:21 schrieb Florian Lindner:
> Am Samstag, 11. Februar 2006 10:18 schrieb Helmut Merz:
> > Is this really your code (registrationForm.html vs.
> > registerForm.html)? Then a 404 shouldn't be a surprise ;-)
>
> Yes, that was my fault. I've this registerForm.html in my
> history and tend to select it accidently.
Ah, sorry, I missed this info in your previous post...
...
> If I change it to form_fields = form.Fields(IRegistrationForm)
> like proposed in another mail
That's the correct way to do it anyway (see
zope/formlib/form.txt).
> I get another error:
...
> File
> "/home/florian/Zope3/src/zope/schema/_bootstrapfields.py",
> line 171, in get
> return getattr(object, self.__name__)
> ForbiddenAttribute: ('blablubb',
> <CS.centershock.centershock.Centershock object at 0xb757a46c>)
>
> blablubb is a field of my interface.
Of which interface? IRegistrationForm only or also ICentershock?
(and no typos? ;-))
If it's in ICentershock and you have something like
<content class="CS.centershock.centershock.Centershock" ...>
<require permission="zope.Public"
interface=".interfaces.ICentershock" />
<require permission="zope.Public"
set_schema=".interfaces.ICentershock" />
</content>
in configure.zcml (and Centershock implements ICentershock, of
course) then you really shouldn't get the ForbiddenAttribute
error.
Helmut
More information about the Zope3-users
mailing list