title: Display progress of a long running Python task in Django
body: <p>I currently have a typical Django structure set up for a project and one web application. </p>
  
  <p>The web application is set up so that a user inputs some information, and this information is taken as the input to run a Python program. </p>
  
  <p>This python program sometimes can take quite a while to finish (grabbing things from the web and doing some text mining scoring) - sometimes it can take multiple minutes to load.</p>
  
  <p>On the command line, this program would periodically display where it was in the process (it'd first say how many things it found to score against, then it'd say where in the number of things found it is in the scoring process), which was very useful. However, when I moved this over to a Django set up, I no longer have this capability (at least, not in the same way since now this is sent to log files). </p>
  
  <p>The way I set it up is that there is an input view, and then a results view. The results view takes the input and runs the Python program. It won't display the results until the entire program is run. So on the user side, the browser just sits there for sometimes minutes before the results are displayed. Obviously, this is not ideal.</p>
  
  <p>Does anyone know of the best way to bring status information on a task to Django? </p>
  
  <p>I've looked into Celery a little bit, but I think since I'm still a beginner in Django that I'm confusing myself with some of the documentation. For instance: even if the task is sent off asynchronously to a worker, how does the browser grab the current state of the program?? Also, consistent documentation seems to be lacking for celery on Django (I've seen people set up celery many different ways on their Django projects).</p>
  
  <p>I would appreciate any input here, I've been stuck on this for a while now.</p>