Django响应有时为空

时间:2018-07-25 19:56:28

标签: django-views

这是我的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次刷新一次)网页将显示完全空白的页面,而不是进度。

0 个答案:

没有答案