progress indicator in a mod_python script

Josh Bloom joshbloom at gmail.com
Thu May 17 19:35:05 EDT 2007


Hi Rajarshi,

What you probably want to do is break this into multiple parts.

When a request comes in to perform a query consider this a new job, give it
an ID and set it off and running.
Then return an HTML page that knows to keep checking a status URL (based on
the ID) every few seconds to see if the job is done, if the job is done,
return the results, if its not return keeps checking until its.

Here's some info about making an HTML Page refresh itself automatically.
http://en.wikipedia.org/wiki/Meta_refresh

-Josh

On 17 May 2007 07:46:28 -0700, Rajarshi <rajarshi.guha at gmail.com> wrote:
>
> Hi, I have a web application built using mod_python.Currently it
> behaves like a standard CGI - gets data from a form, performs a query
> on a backend database and presents a HTML page.
>
> However the query can sometimes take a bit of time and I'd like to
> show the user some form of indeterminate progress indicator (spinning
> dashes etc). My searching seems to indicate that this is based on some
> form of asynchronous calls (AJAX) and I'm not sure how I can achieve
> this effect in my mod_python app.
>
> Any pointers to achieve this would be very appreciated.
>
> Thanks,
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070517/14e8acf2/attachment.html>


More information about the Python-list mailing list