Re: [Zope3-Users] Total n00b to zope3 and apache.
Am Donnerstag, 27. Juli 2006 21:46 schrieb Steve Juranich: > Judging from what I've found in my scrounging around the > internet, I cooked up the following chunk of httpd.conf: This: > NameVirtualHost localhost:8080 # The ZServer process's port > should be: NameVirtualHost localhost:8000 # The Apache process's port HTH Helmut ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Trying to use browser:form -> 404
Am Samstag, 11. Februar 2006 17:26 schrieb Florian Lindner: > Am Samstag, 11. Februar 2006 16:40 schrieb Garanin Michael: > > > I still don't understand why it's necessary that the > > > content object needs to implement or be adaptable to the > > > schema from which the form is generated. > > > > > > > > > Florian > > > > It's normal and it's right: content object MUST be adaptable > > to shema-interface. It's 'components world' ;-) > > No, you misunderstood me. The IRegistrationForm interface has > nothing to do with the ICentershock interface. > Look at the recend email from Helmut Merz <[EMAIL PROTECTED]> in > this thread. He did exactly what I want and it works without > an implements. In fact, also in this case you have a context object (or an adapter to it) - and it's still your Centershock object. But while EditForm tries to fill the form with data from the context (giving you the ForbiddenAttribute error because Centershock's interface does not declare the schema's fields) the Form class just ignores the context... Helmut ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Trying to use browser:form -> 404
Am Samstag, 11. Februar 2006 14:11 schrieb Florian Lindner: > > > blablubb is a field of my interface. > > > > Of which interface? IRegistrationForm only or also > > ICentershock? (and no typos? ;-)) > > of IRegistrationForm and not of ICentershock I see... Seems to be OK for what you're wanting to do. > Note that I don't want to edit an ICentershock object, I don't > want to edit any kind of object. I just want to create a form > based on a schema. The schema has no use but to provide the > fields information for the form. The processing of the data > entered is done manually in python code. > > registrationForm.html is not a view on a Centershock object. > It should be a form in which the user can enter data that is > being processed by the view class and ultimately create an > user in a PAU utility. The ICentershock objects should server > as a kind of root object of my application, the object that > provided all the pages that can't be assigned to an instance > of an object (like contact information or the powered by Zope > page). OK, but for EditForm you need an object the fields of the form can be bound to. If that's not a content object it could just be an adapter. Another and probably better way in this case would be not to derive from EditForm but from Form. I just have to solve a similar problem and got it working the following way (IPersonRegistration is the schema for the form, INode is the interface of something like your Centershock object): browser/configure.zcml: browser/registration.py: from zope.formlib.form import Form, FormFields, action from zope.formlib.i18n import _ class PersonRegistrationView(EditForm): form_fields = FormFields(IPersonRegistration) @action(_("Apply")) def handle_edit_action(self, action, data): print data # here we'll do the real stuff... As often with Zope 3: simple but not easy (to find out) ;-) Helmut ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Trying to use browser:form -> 404
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', > ) > > 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 in configure.zcml (and Centershock implements ICentershock, of course) then you really shouldn't get the ForbiddenAttribute error. Helmut ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Trying to use browser:form -> 404
Am Freitag, 10. Februar 2006 22:18 schrieb Florian Lindner: > > in configure.zcml: ... > name="registrationForm.html" > And I try to call it with: > > /++skin++centershock/cs/registerForm.html Is this really your code (registrationForm.html vs. registerForm.html)? Then a 404 shouldn't be a surprise ;-) Helmut ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users