django.core.servers.basehttp.FileWrapper disappears in Django 1.9
Asked Answered
D

1

44

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 follow:

from django.core.servers.basehttp import FileWrapper

Searching this name in django 1.9 release notes gives no result. What is the replacement for FileWrapper ?

Debag answered 5/3, 2016 at 17:51 Comment(0)
B
89

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

from wsgiref.util import FileWrapper
Biagi answered 5/3, 2016 at 17:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.