这是我的views.py的结构:
def results(request):
for x in 1-100:
do 1/100th of the work
open loading.html
write to loading.html saying i've done x amount of work and force loading html to auto refresh.
close loading.html
render_to_response(results.html)
def loading(request):
render_to_response(loading.html)
但是偶尔(也许每20次刷新一次)网页将显示完全空白的页面,而不是进度。