3👍
✅
The guys at Django IRC told to use HttpResponse with a generator to continuously send an output and thus prevent the script from idle-timeout.
The code for using Httpresponse with generator has been wonderfully described here and here.
Thanks everyone!
4👍
Timeout is in webserver, not in Django. You make a request to webserver and get a response from it, so you can’t get anything outside of that response. In your case you should create a background task on server, usually getting started by cron or celery (it hink you can’t run celery on hostgator so use cron) with a queue of tasks. On the cliend side you periodically make requests to server using AJAX, so you can check status of a task and display notification if it is completed.
- [Django]-Ignoring [Django] ERROR (EXTERNAL IP): Internal Server Error
- [Django]-Relative font URLs in CSS cause 403s on S3
- [Django]-Django.db.utils.NotSupportedError: FOR UPDATE cannot be applied to the nullable side of an outer join
Source:stackexchange.com