1👍
You can’t do the partial computation in a function synchronous way. You can try to consider this library celery to do the asynchronous execution.
OR ELSE
You have to go with intermediate middleware where Python and Javascript can be communicated in thread safe way like redis queue, zmq etc..
👤Nava
0👍
Ajax would be more appropriate to do this kind of “real time” updates. It allows you to send asynchronous (the A of AJAX) requests/datas.
Put a script in your web page that will update the render everytime your server send new datas.
You can find more on this here : http://api.jquery.com/jquery.ajax/
- [Answer]-Django regex – optional grouped parameters
- [Answer]-How to rebuild template for django?
- [Answer]-Csrf token issue with multiple templates
- [Answer]-Run specific django manage.py commands at intervals
- [Answer]-Uploading files to directory named by the value of a Foreign key field
Source:stackexchange.com