You should create a work queue of some sort, have the view add an entry to the queue, then return the HTML page to the browser. A separate process, for example, a crontab job, can pull entries from the queue and work on them. A web server itself is not a good place to do long-running work that isn't being served directly to a browser.
--Ned. http://nedbatchelder.com emy_66 wrote: > Hello, > > I'm new to web development and I am not sure how to code for this: > > Displaying an html page straight away after the user hits submit > (telling the user that they will be notified by email when their job > has finished running), whilst running the time-intensive task in the > background. > > Any advice will be appreciated. > > Thanks in advance, > Emily > > > > > -- Ned Batchelder, http://nedbatchelder.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

