django.core.servers.basehttp.FileWrapper disappears in Django 1.9

前端 未结 1 1002
梦如初夏
梦如初夏 2021-02-05 00:59

I am migrating from django 1.8 to 1.9. and I got the following error:

ImportError: cannot import name \'FileWrapper\'

I import it as

1条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-05 01:28

    Django just had a wrapper to the wsgiref module you can just get it directly

    from wsgiref.util import FileWrapper
    

    0 讨论(0)
提交回复
热议问题