[Zope3-Users] feedback while asking response
Markus Leist
ml_zope3_dev at ikom-online.de
Thu Apr 14 02:58:03 EDT 2005
Hmm,
in which way this interacts with an application-class?
It's not a change of any zope-intern class, or?
i.e. my test-class is:
----------------------------------------
class adm:
def admTestOut( self):
"""
test for "online-feedback"
"""
response = self.request.response
response.write( "1111")
time.sleep(10)
response.write( "2222")
----------------------------------------
snip on configure.zcml:
----------------------------------------
<page
name="admtestout"
for="ikom.ikgen.interfaces.IIkGen"
class=".ikgen.adm"
permission="ikom.ikgen.Edit"
attribute="admTestOut" />
----------------------------------------
Ok, this does not work, a cleary case:
the response will display "11112222"
after 10s.
In which way, I have to integrate a
View-Class and the _call_-method to
my application?
Thanks for help
Markus
Am Mittwoch, 13. April 2005 16:32 schrieb Stephan Richter:
[...]
> You can do this by directly writing to the response and not returning
> anything through the executing method:
>
> class View(object):
>
> def __call__(self):
> response = self.request.response
> # ... set all necessary headers
> response.write(data)
> sleep(10)
> response.write(data)
> sleep(10)
> response.write(data)
>
[...]
More information about the Zope3-users
mailing list