Re(2): [Zope3-Users] file upload limit using zope behind apache
Hi Jachin, thank you for your response. You are right, it's always a good idea to look at the logfiles ... which reports: proxy: error reading status line from remote server localhost, referer: http:// ... proxy: Error reading from remote server returned by ... , referer: http:// ... As far as I have read up on this, it could be the apache bug 37770 (mod_proxy). Until now I didn't found a workaround. -klaus Ursprüngliche Nachricht am: Wed, 3 May 2006 14:55:19 -0500 von: Jachin Rupe : [EMAIL PROTECTED] hi there Since it works when zope is not behind apache the problem is probably with Apache. Maybe the error logs will provide some clue. You could try looking in your apache error logs. The error logs for Apache on OS X are in this directory: /var/log/httpd One of my favorite tricks in cases like this to open a terminal and run one of these: tail -f /var/log/httpd/error_log Then recreate the error (i.e upload a file larger than 70k), and if there are errors you'll see the error pop up in the terminal. Let me know what you find out, I'm working on an zope app that will eventually require file uploads that I want to put behind apache and any tricks to make that work right would be good to know. -jachin On May 3, 2006, at 11:54 AM, Klaus Bremer wrote: Hello, I'm running zope 3.2.0 behind apache 2.0.54 (on Mac OS X 10.4.5) and can't upload files larger than aproximatly 70k using forms into zope. By accessing zope direct it works. The apache directive LimitRequestBody seems to have no effect. Does anybody know where to look next? Best regards -klaus ___ 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
Re: [Zope3-Users] Formlib and AddForm
On 5/4/06, Christian Klinger [EMAIL PROTECTED] wrote: snip I have a formlib edit_form for my content type. Now i want use this edit_form as addform. Few months back I have asked a similar question, may be usefull: http://mail.zope.org/pipermail/zope3-users/2005-December/001689.html http://mail.zope.org/pipermail/zope3-users/2005-December/001691.html Regards, Baiju M ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Formlib and AddForm
On 5/4/06, baiju m [EMAIL PROTECTED] wrote: On 5/4/06, Christian Klinger [EMAIL PROTECTED] wrote: snip I have a formlib edit_form for my content type. Now i want use this edit_form as addform. Few months back I have asked a similar question, may be usefull: http://mail.zope.org/pipermail/zope3-users/2005-December/001689.html http://mail.zope.org/pipermail/zope3-users/2005-December/001691.html Also see these example app: http://codespeak.net/svn/z3/zopeweb/trunk/content/documentation/z3tut/collector/ Regards, Baiju M ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Formlib and invariants?
Bernd, That took care of it. Thanks a million. Mats On Thu, 4 May 2006 05:51:52 +0200, Bernd Dorn wrote yes, this should really be fixed up in the default implementation of formlib because interface.Invalid has no registered multiadapter to zope.app.form.browser.interfaces.IWidgetInputErrorView you have to raise a WidgetInputError an example for such an error: from zope.schema import Datetime,Bool,ValidationError from zope.app.form.interfaces import IWidgetInputError class FromGreaterThanTo(ValidationError): uFrom-Date is after To-Date # this is needed to adapt to a view for formlib implements(IWidgetInputError) On 03.05.2006, at 20:59, mats.nordgren wrote: I'm trying to do a join form with formlib and are getting errors when checking invariants. I have my form interface IJoinForm class IJoinForm(Interface): a join form username = schema.TextLine( title=_('User Name'), required=True) password = schema.Password( title=_('Password')) password_check = schema.Password( title=_('Enter Password Again')) title = schema.TextLine( title=_('Title')) @invariant def checkPasswords(obj): if obj.password != obj.password_check: raise Invalid(Passwords do not match) And then I have my implementation of form.Form: class JoinMetroSite(form.Form): form_fields = form.Fields(IJoinForm) @form.action('Join') def handle_join_action(self, action, data): principal_folder = zapi.getUtility(IAuthenticatorPlugin, 'principal') principal = InternalPrincipal(data['username'], data ['password'], data['title']) principal_folder[data['username']] = principal My form in registered with: page for=* class=.metrositeforms.JoinMetroSite name=join.html permission=zope.View menu=zmi_views title=Join / When I try the join.html form I get the following error: Traceback (innermost last): Module zope.publisher.publish, line 138, in publish result = publication.callObject(request, object) Module zope.app.publication.zopepublication, line 161, in callObject return mapply(ob, request.getPositionalArguments(), request) Module zope.publisher.publish, line 113, in mapply return debug_call(object, args) - __traceback_info__: security proxied zope.app.publisher.browser.viewmeta.JoinMetroSite instance at 0x034C9B50 Module zope.publisher.publish, line 119, in debug_call return object(*args) Module zope.formlib.form, line 739, in __call__ return self.render() Module zope.formlib.form, line 733, in render self.form_result = self.template() Module zope.app.pagetemplate.viewpagetemplatefile, line 83, in __call__ return self.im_func(im_self, *args, **kw) Module zope.app.pagetemplate.viewpagetemplatefile, line 51, in __call__ sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0), Module zope.pagetemplate.pagetemplate, line 117, in pt_render strictinsert=0, sourceAnnotations=sourceAnnotations)() Module zope.tal.talinterpreter, line 277, in __call__ self.interpret(self.program) Module zope.tal.talinterpreter, line 352, in interpret handlers[opcode](self, args) Module zope.tal.talinterpreter, line 878, in do_defineMacro self.interpret(macro) Module zope.tal.talinterpreter, line 352, in interpret handlers[opcode](self, args) Module zope.tal.talinterpreter, line 926, in do_extendMacro definingName, extending) Module zope.tal.talinterpreter, line 908, in do_useMacro self.interpret(macro) Module zope.tal.talinterpreter, line 352, in interpret handlers[opcode](self, args) Module zope.tal.talinterpreter, line 538, in do_optTag_tal self.do_optTag(stuff) Module zope.tal.talinterpreter, line 523, in do_optTag return self.no_tag(start, program) Module zope.tal.talinterpreter, line 518, in no_tag self.interpret(program) Module zope.tal.talinterpreter, line 352, in interpret handlers[opcode](self, args) Module zope.tal.talinterpreter, line 878, in do_defineMacro self.interpret(macro) Module zope.tal.talinterpreter, line 352, in interpret handlers[opcode](self, args) Module zope.tal.talinterpreter, line 976, in do_defineSlot self.interpret(block) Module zope.tal.talinterpreter, line 352, in interpret handlers[opcode](self, args) Module zope.tal.talinterpreter, line 966, in do_defineSlot self.interpret(slot) Module zope.tal.talinterpreter, line 352, in interpret handlers[opcode](self, args) Module zope.tal.talinterpreter, line 878, in do_defineMacro self.interpret(macro) Module zope.tal.talinterpreter, line 352, in interpret handlers[opcode](self, args) Module
Re: [Zope3-Users] comments in ZCML
On 5/4/06, luis [EMAIL PROTECTED] wrote: I'm having problems writing !-- comments -- in my zcml configuration files... for example, if during development I want to comment out some of the registrations, or just write some note on what an adapter (for example) is used for, I get a ZopeSAXParseException: ...(invlid token) error on zope start- is this a bug? or am I doing something wrong here? Does your comment include -- anywhere, perhaps? Without seeing more of the traceback and your ZCML, it's hard to say what's wrong. It definately sounds like a problem with the XML rather than the software, since a popular XML parser is being used (Expat, in particular). We do use comments in ZCML regularly, so we know they're properly supported. -Fred -- Fred L. Drake, Jr.fdrake at gmail.com Don't let schooling interfere with your education. -- Mark Twain ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: comments in ZCML
On 5/4/06, luis [EMAIL PROTECTED] wrote: yep. that was it.. thanks! No problem. Just be glad we're not using SGML, where the comment rules are *much* more subtle. :-) -Fred -- Fred L. Drake, Jr.fdrake at gmail.com Don't let schooling interfere with your education. -- Mark Twain ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: comments in ZCML
luis wrote: yep. that was it.. thanks! I was using comments like !-- --- Adapters -- which is causing problems...I didn't know -- wasnt allowed in xml-comments.. You /can/ use -- in HTML comments, but the rules for doing so are so complex that most people don't bother. -- Benji York Senior Software Engineer Zope Corporation ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: comments in ZCML
On 5/4/06, Benji York [EMAIL PROTECTED] wrote: You /can/ use -- in HTML comments, but the rules for doing so are so complex that most people don't bother. That's because HTML is SGML. XHTML is not, and has the same restrictions as any other XML-based language. -Fred -- Fred L. Drake, Jr.fdrake at gmail.com Don't let schooling interfere with your education. -- Mark Twain ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] has a relationships
hi there I have another zope theory question. I am working on designing a application in zope. I've been looking at a lot of examples and I am wondering how people are implementing different types of relationships between different persistent objects. For instance I am going to be doing a lot with addresses. Naturally it would be nice to have persistent Address class. Then I would say that a Person has an Address and a Company has an Address. My two different ideas are as follows: 1. Make Person and and Company containers that can each contain an Address. I don't really like this idea because it seems like container objects are for things like folders. This could be the best way though and I'm just not zoppie enough yet. 2. Add an Object for the Address to the schema for IPerson and ICompany (assuming I only need one address) or a List / Dict (if I want more than one address for each person or company). I like this idea better but I have yet to see any examples where someone does that which is making me a little nervous. Among other things I'd like to be able to see what happens when addforms and editforms get generated for things like this or at least be assured that's the way it is supposed to work. I just got my very own copies of the Zope 3 Developers Handbook and Web Component Development with Zope 3 (I'd suggest these books to anyone by the way). I have given each a once over as well as looking at lots of shorter tutorials / examples online and have not noticed any example projects doing anything like my second idea. So in your answer please feel free to point out something in either of those books (I may have missed) or refer me to some other online example where something like this is going on. thanks -jachin ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Formlib and invariants?
On May 4, 2006, at 7:44 AM, Bernd Dorn wrote: On 04.05.2006, at 13:35, Gary Poster wrote: On May 3, 2006, at 11:51 PM, Bernd Dorn wrote: yes, this should really be fixed up in the default implementation of formlib because interface.Invalid has no registered multiadapter to zope.app.form.browser.interfaces.IWidgetInputErrorView you have to raise a WidgetInputError an example for such an error: from zope.schema import Datetime,Bool,ValidationError from zope.app.form.interfaces import IWidgetInputError class FromGreaterThanTo(ValidationError): uFrom-Date is after To-Date # this is needed to adapt to a view for formlib implements(IWidgetInputError) Well, you can raise any error from an invariant that extends...zope.interface.Invalid, maybe? The invariant interface says what is allowed somewhere in zope.interface. ...I suppose we could have a generic view for Invalid errors that simply said This is invalid, try again? Doesn't seem very useful to me. You are responsible for making sure you have a reasonable exception view of an exception you raise. I'm inclined to think that this is a documentation bug at worst. yes, because in form.txt Invalid is used directly, wich implies that this should work Would you mind putting in a collector issue for this? Thanks Gary ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users