Re: Time.sleep & HttpResponse

2007-12-24 Thread Malcolm Tredinnick
On Sun, 2007-12-23 at 12:12 +0200, Matti Haavikko wrote: > Malcolm Tredinnick wrote > > Based on your later, slightly cryptic reply in this thread, I gather you > > are hoping that HttpResponse is acting as a streamable pipe back to the > > browser. This isn't correct. You create an HttpResponse

Re: Time.sleep & HttpResponse

2007-12-23 Thread Matti Haavikko
Malcolm Tredinnick wrote > Based on your later, slightly cryptic reply in this thread, I gather you > are hoping that HttpResponse is acting as a streamable pipe back to the > browser. This isn't correct. You create an HttpResponse instance and > when you return from your view, Django will send al

Re: Time.sleep & HttpResponse

2007-12-17 Thread Malcolm Tredinnick
On Mon, 2007-12-17 at 07:10 -0500, Ariel Calzada wrote: > l5x wrote: > > "I propose to design and implement an API to make Comet behavior > > available to Django applications." > > http://hosted.corp.it/django/full.html > > > > > > > > Good Idea :-) Keep in mind that that link was a proposal

Re: Time.sleep & HttpResponse

2007-12-17 Thread Malcolm Tredinnick
On Sun, 2007-12-16 at 16:14 -0800, azer wrote: > Hi, > > I'm trying to use Time.sleep function on printing, here is the code: > > def sleep(request): > res = HttpResponse() > res.write("hello") > time.sleep(3) > res.write("hello"); > return res > > But it doesn't

Re: Time.sleep & HttpResponse

2007-12-17 Thread Ariel Calzada
l5x wrote: > "I propose to design and implement an API to make Comet behavior > available to Django applications." > http://hosted.corp.it/django/full.html > > > > Good Idea :-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Go

Re: Time.sleep & HttpResponse

2007-12-17 Thread l5x
"I propose to design and implement an API to make Comet behavior available to Django applications." http://hosted.corp.it/django/full.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: Time.sleep & HttpResponse

2007-12-17 Thread azer
Comet:http://www.google.com/search?hl=en&q=comet reverse ajax: http://www.google.com/search?hl=en&q=reverse ajax On Dec 17, 3:35 am, l5x <[EMAIL PROTECTED]> wrote: > If you put /print "hello"/, the server should print it with given > delay (on the server side). > I think that you should use JS/AJ

Re: Time.sleep & HttpResponse

2007-12-16 Thread l5x
If you put /print "hello"/, the server should print it with given delay (on the server side). I think that you should use JS/AJAX to update the page after it is sent to the user (script on the user side). --~--~-~--~~~---~--~~ You received this message because you a

Time.sleep & HttpResponse

2007-12-16 Thread azer
Hi, I'm trying to use Time.sleep function on printing, here is the code: def sleep(request): res = HttpResponse() res.write("hello") time.sleep(3) res.write("hello"); return res But it doesn't work (Page waits 3 seconds and prints "hellohello"), how can i