[Zope3-Users] getting post data in a Zope 3 view

2008-08-19 Thread Chris Withers
Hi All, I have a view: from zope.publisher.browser import BrowserView class Receiver(BrowserView): def __call__(self): print self.request.bodyStream.read() return 'done' ...which I'm trying to test with the following script: import socket socket.setdefaulttimeout(5)

Re: [Zope3-Users] getting post data in a Zope 3 view [moreinfo: paster]

2008-08-19 Thread Chris Withers
Chris Withers wrote: ...but the processing seems to hang in bodyStream.read() until the socket times out on the client side (ie: I get a timeout exception) at which point the read() returns and shows what I'd expect. What am I doing wrong? I should note that I'm using paster serve here, so

Re: [Zope3-Users] getting post data in a Zope 3 view - paste.httpserver is the problem

2008-08-19 Thread Chris Withers
Chris Withers wrote: I should note that I'm using paster serve here, so I wonder if that has any bearing? Well no, but the fact that my deploy.ini contained the following: [app:main] use = egg:HelloWorld [server:main] use = egg:Paste#http host = 127.0.0.1 port = 8080 ..was the problem.

Re: [Zope3-Users] getting post data in a Zope 3 view [moreinfo: paster]

2008-08-19 Thread Chris Withers
Alek Kowalczyk wrote: I would suggest checking if the Content-Length value has been properly set. Yep, httplib.HTTPConnection does this for you. I even checked that it works ;-) cheers, Chris -- Simplistix - Content Management, Zope Python Consulting -

[Zope3-Users] building zope 3 instances?

2008-08-19 Thread Chris Withers
Hi All, Am I right in thinking that this is now the canonical way to get a zope 3 instance: http://pypi.python.org/pypi/zc.zope3recipes ? If so, could the owners of these packages hide, remove or otherwise document that they're out of date:

[Zope3-Users] z3c.form: terms/validation and problems with context

2008-08-19 Thread Carsten Senger
I use a session-based wizard with plone.z3cform that uses the concept from z3c.formdemo's wizard. The content is kept inside a session until it is written into the db in .finish(). I have problems with Lists and Choices where the vocabulary needs a suitable context that the content from the

Re: [Zope3-Users] building zope 3 instances?

2008-08-19 Thread Philipp von Weitershausen
Chris Withers wrote: Am I right in thinking that this is now the canonical way to get a zope 3 instance: http://pypi.python.org/pypi/zc.zope3recipes ? If you still want an instance, yes. I don't particularly like instances as we've had them with Zope 2 and Zope 3 (they don't quite work

Re: [Zope3-Users] building zope 3 instances?

2008-08-19 Thread Chris Withers
Philipp von Weitershausen wrote: http://pypi.python.org/pypi/zc.zope3recipes ? If you still want an instance, yes. I don't particularly like instances as we've had them with Zope 2 and Zope 3 (they don't quite work in a WSGI environment). So what do you do instead? How do people get a