Python - How to import 'ContentFile' -- django

Import ContentFile

To import ContentFile, Add the following line to the top of your code.

from django.core.files.base import ContentFile

 

For more information about ContentFile:
django ContentFile