search

Home  >  Q&A  >  body text

python - django的模板预加载

就是如: return render(request, 'index.html', {'lists':lists})
假设我lists的数据处理比较多麻烦,所以渲染打开页面的时候可能较长,
那怎么让他渲染好之前,先弄个预加载图片什么之类的。
就是不要停在空白太长时间。谢谢

巴扎黑巴扎黑2785 days ago502

reply all(1)I'll reply

  • 巴扎黑

    巴扎黑2017-04-18 10:29:56

    render is returned to the front-end after the back-end renders it
    It is divided into two parts: data and pictures
    1. The data is asynchronous and processed by ajax, that is, your back-end does not render the data and obtains the data through asynchronous calling interfaces
    2. Picture preloading, please refer to: http://www.cnblogs.com/haoyij...

    reply
    0
  • Cancelreply